A Rust crate for automatically generating C header files from Rust source code, enabling C interoperability.
rusty-cheddar is a Rust crate that automatically generates C header files from Rust source code, enabling interoperability between Rust libraries and C programs. It solves the problem of manually creating and maintaining C headers for Rust APIs, ensuring type safety and compatibility. The tool is particularly useful for projects that need to expose Rust functionality to C-based systems.
Rust developers who need to create C-compatible interfaces for their libraries, such as those building FFI (Foreign Function Interface) bindings or integrating Rust code into existing C codebases.
Developers choose rusty-cheddar for its automation of header generation, reducing manual effort and potential errors. Its integration with Cargo build scripts streamlines the build process, and its support for common Rust-to-C type conversions ensures reliable interoperability.
A Rust crate for automatically generating C header files from Rust source file.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Converts Rust source files into C header files automatically, reducing manual effort and errors in creating FFI bindings, as shown in the build script examples.
Designed to be used within Cargo build scripts for seamless header creation during compilation, simplifying the build process for Rust-C interoperability.
Allows defining opaque structs via newtypes marked #[repr(C)], enabling the use of arbitrary Rust structs in C while hiding implementation details.
Targets C99 or later standards, leveraging stdint.h and stdbool.h for type safety and using single-line comments, ensuring modern C compatibility.
The project is no longer actively maintained, with the README explicitly recommending cbindgen for more features, making it risky for new or ongoing projects.
Fails on generics in enums and structs, diverging functions, and requires fully qualified paths for libc types, restricting complex API exposures.
In pre-v1.0.0 state, it undergoes frequent breaking changes with minor version bumps, leading to potential instability and migration headaches.
Tests require a specific version of CppHeaderParser and must be run from the project directory, indicating poor test infrastructure and setup complexity.