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

See [NS_ENUM docs][appledocs]. See this excerpt from docs.md for motivation: [appledocs]: https://developer.apple.com/documentation/swift/objective-c_and_c_code_customization/grouping_related_objective-c_constants > Normally, the ergonomics of C enums in Swift is very poor; you can't use the variants directly...

PS C:\Users\ryoungblood\repos\second_rust_lib> cbindgen -o target/second_rust_lib.h PS C:\Users\ryoungblood\repos\second_rust_lib> cbindgen -o target thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 5, kind: PermissionDenied, message: "Access is denied."...

We use a custom (private) crate with collections, that accepts as a second generic parameter additional type. After adding a private alias (e.g. `type MyVec = Vec;`) the cbindgen (both...

I'm looking for a way to achieve the equivalent of ```toml [macro_expansion] bitflags = true ``` in my `build.rs` but it doesn't appear possible?

enhancement
help wanted

My package [tectonic] has a workspace dependency that uses cbindgen, and it won't build on docs.rs: [tectonic]: https://github.com/tectonic-typesetting/tectonic/ ``` [INFO] [stderr] thread 'main' panicked at 'Unable to generate bindings: CargoMetadata("/opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/tectonic_bridge_flate-0.1.1/Cargo.toml",...

As of #646 `Option` gets translated to `uint32_t` correctly. If you have a `#[repr(transparent)]` struct containing a `NonZeroU32` field, that gets translated to `uint32_t` as well. But if you have...

bug
help wanted

```rust #[repr(C)] pub struct Test { pub data: [u8; Self::LEN], } impl Test { pub const LEN: usize = 8; } ``` ```c typedef struct { uint8_t data[LEN]; } Test;...

bug
help wanted

With the following code: ```rust use libc::int32_t; type DoFn = unsafe extern "C" fn (x: int32_t, y: int32_t) -> int32_t; type NonNullAlias = NonNull; #[repr(C)] #[derive(Clone, Copy, Debug, Eq, Hash,...

bug
help wanted

This work was started in PR https://github.com/eqrion/cbindgen/pull/635, but stalled. This feature would be really useful, so I thought it would be a good idea to create this issue to track...

enhancement
help wanted

A tuple like the following: ``` #[repr(C)] pub enum A { VarA(), VarB(u8), } ``` is mapped differently in C and C++ due to the fact that C and C++...

bug
help wanted