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

THeres a crash somewhere when binding rapier for c here's a log (don't know what else to say) ``` $ ~/.cargo/bin/cbindgen --config ~/.config/cbindgen.toml --lang c --crate rapier3d --output rapier.h WARN:...

cc @jorendorff (not sure of a great fix for this, for the record, filing so that I don't lose track of it). I wanted to do something like this today:...

bug

I am a native rust coder so take this with a grain of salt: My understanding is that when you are creating a library it is best practice to define...

hello. can you please add support for c_size_t type. seems is not handled properly.

enhancement

A minimal example: ```rust #[repr(C)] pub struct MyStruct { int_field: u32, generic_field: T, } #[no_mangle] pub extern "C" fn my_test() -> MyStruct { MyStruct { int_field: 0, generic_field: () }...

bug
help wanted

I ran into this problem wrapping a couple other crates together to automatically produce bindings for a library. I've reduced the bug down to just a crate with the following...

I _believe_ that right now cbindgen can basically be used once per project to generate a single header file, with no dependencies. I'm working on ICU4X, which is a modular...

enhancement
help wanted

…eference '&' Example of issue: Rust code: ``` #[no_mangle] pub extern "C" fn key_to_hex(raw_hex: &mut [c_char; GXT_KEY_LEN_HEX], raw_key: &[u8; GXT_KEY_LEN]) ``` Incorrect C Code: ``` void key_to_hex(char (*rawHex)[GXT_KEY_LEN_HEX], const uint8_t...

This PR introduces the `mangle.type_replacements` option, allowing users to replace type parameter names with their own strings when name mangling. This enables users to customize and control the output of...

We have an application that is part Rust, part C. We use `extern "C" {` to define C functions to Rust. However, `cbindgen` appears to re-export these back out. Short...