cbindgen
« Back to VersTracker
Description:
Project for generating C bindings from Rust code
Type: Formula  |  Latest Version: 0.29.0@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: rust ffi c-bindings code-generation development
Install: brew install cbindgen
About:
cbindgen is a tool that parses Rust source code to generate C header files compatible with C and C++ FFI. It automatically creates function prototypes, struct definitions, and type aliases, ensuring that your C bindings stay in sync with your Rust API. This significantly reduces the manual effort and potential errors involved in creating cross-language interfaces.
Key Features:
  • Automatic C/C++ header file generation from Rust code
  • Supports configurable type mapping and formatting
  • Integrates with build systems like Cargo
  • Generates bindings for both C and C++ (extern "C++")
Use Cases:
  • Creating C-compatible libraries with Rust backends
  • Exposing Rust functions to existing C/C++ applications
  • Automating FFI interface maintenance in large projects
Alternatives:
  • bindgen – cbindgen generates C headers from Rust, while bindgen generates Rust bindings from C headers.
License: MPL-2.0
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, arm64_ventura, sonoma, ventura, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Sep 12, 2025 5:47am 0 VERSION_BUMP 51addf3e