csbindgen icon indicating copy to clipboard operation
csbindgen copied to clipboard

Annotations

Open qryxip opened this issue 1 year ago • 0 comments

This is a feature request. (I'm also ready to create a PR)

Enable adding attributes to items like cbindgen's annotation.

I come up with three ways to write annotations:

  1. Respect cbindgen's annotations

    /// cbindgen:ignore
    pub Item(rust_impl::Item);
    
  2. /// csbindgen:annotation

    /// cbindgen:ignore
    /// csbindgen:ignore
    pub Item(rust_impl::Item);
    
  3. #[cfg_attr(any(), csbindgen::ignore)]

    /// cbindgen:ignore
    #[cfg_attr(any(), csbindgen::ignore)] // like `#[cfg_attr(any(), rustfmt::skip)]`
    pub Item(rust_impl::Item);
    

qryxip avatar Oct 05 '24 14:10 qryxip