cbindgen icon indicating copy to clipboard operation
cbindgen copied to clipboard

A project for generating C bindings from Rust code

Results 190 cbindgen issues
Sort by recently updated
recently updated
newest added

`lib.rs`: ``` //! This comment will not be exported. ```

enhancement
help wanted

A library I'm currently binding to Rust ([liboscore](https://gitlab.com/oscore/liboscore)) has something of a compile-time module system (think back-end, not plug-in; there's only one back-end at a compile time) that works like...

When using the export prefix option, it is added twice to the "enum body" structs: PrefixEnum_PrefixCase_Body; The second prefix is not necessary.

enhancement
help wanted

There are a few settings in cbindgen that generate helper C++ methods for working with tagged enums, but they all seem tied to derive helper methods: - derive_helper_methods: false -...

enhancement
help wanted

This Rust code: ```rust #[repr(C, u8)] pub enum S { Leaf(i32), Parent(Box), } #[no_mangle] pub extern "C" fn root(f: &S) {} ``` only generates a forward declaration of `S`, because...

enhancement
help wanted

I'm trying to export some Rust functions as a DLL to be used in a larger application, but instead of the usual `extern "C"` calling convention, I'm using `stdcall`. With...

enhancement
help wanted

I wonder if it is possible to add an annotation for functions to customize the return type of a function, something like this: ```rust /// cbindgen:return-type=Foobar pub extern "C" fn...

enhancement
help wanted

Sample Input: ```rust #[repr(C)] pub struct Matrix { pub data: [f32; 20], } #[repr(C)] pub enum Data { Something, Matrix(Matrix), } #[no_mangle] pub unsafe extern "C" fn new_data() -> *mut...

bug
help wanted

Spun off from #431. Since https://github.com/rust-lang/rust/pull/61229, aligned enums have a stable representation and thus we should represent them correctly when generating non-opaque versions.

enhancement
help wanted

Split off from #431 Right now, we don't generate structs for `#[repr(packed(n))]` structures because it appears that there is a fair amount of difficulty generating the correct field alignments due...

enhancement
help wanted