cbindgen
cbindgen copied to clipboard
A project for generating C bindings from Rust code
Everything else can have a rename rule. Why not items too! Example below. Nice and neat, no `#![allow(non_camel_case_types)]` required. ```rust #[repr(c)] struct StructDef { x: i32, y: f32, } type...
The current implementation never goes to a new line when writing a function pointer type, this can lead to long, difficult to read lines. The goal of this change is...
[Zig](https://ziglang.org) is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software. ## Status: [ WIP ] - [x] Add [primitive types](https://ziglang.org/documentation/master/#Primitive-Types) and [C primitive types](https://ziglang.org/documentation/master/#C-Type-Primitives) (`c_void`...
If you have a c file such as: ``` #include int main(...) { ... } ``` And you use cbindings.h as emitted by cbindgen with language "C" provided, this will...
WARN: Can't find Unique. This usually means that this type was incompatible or not found. If I had to guess it would be because its both transparent and includes a...
See attached issue. Resolves #784
Cbindgen headers can get big. It may make sense to allow outputting a forward-declaration version of the header that declares the relevant types, though I haven't dug into how much...
I encountered a problem with the expansion of macros using build.rs. Here is a minimal example to point out the problems I'm having. I have the following `lib.rs`. ```rust //...
At the moment, when a generic tagged enum is used, a tag enum is generated for every specialization of the generic. However, the possible tags and their values do not...
Why does std::ffi, specifically CStr and CString not (at least fully in the case of std::ffi) work?
I do not know whether or not this is purposeful due to some limitations or something of the sort, but a lot of the types from std::ffi don't seem to...