CBINDGEN(1)
β¨ CBINDGEN(1) β C bindings for your Rust fave β¨
okay so welcome to the cbindgen(1) manual page, bestie π β this one lives in the User Commands corner of manual-land, and this specific glow-up is for cbindgen 0.29.4. Itβs giving βgenerate C bindings for a Rust library,β and honestly? iconic behavior, slay π«Ά
π NAME π
cbindgen β manual page for cbindgen 0.29.4. Thatβs the name, the version, the whole vibe check, periodt π
π¦ SYNOPSIS π¦
cbindgen [OPTIONS] [INPUT]
πΈ DESCRIPTION πΈ
Generate C bindings for a Rust library. No cap, thatβs the main-character job.
π Arguments π
[INPUT]β a crate directory or source file to generate bindings for. In general this is the folder where theCargo.tomlfile of source Rust library resides.
π OPTIONS π
okay bestie, hereβs the full flag lineup β every single one, no skipping, fr fr π§
-v...β Enable verbose logging.--verifyβ Generate bindings and compare it to the existing bindings file and error if they are different.-c,--config <PATH>β Specify path to acbindgen.tomlconfig to use.-l,--lang <LANGUAGE>β Specify the language to output bindings in. Possible values:c++,C++,c,C,cython,Cython.--package-versionβ Include the package version in the header comment.--cpp-compatβ Whether to add C++ compatibility to generated C bindings.--only-target-dependenciesβ Only fetch dependencies needed by the target platform. The target platform defaults to the host platform; setTARGETto override.-s,--style <STYLE>β Specify the declaration style to use for bindings. Possible values:Both,both,Tag,tag,Type,type.-d,--parse-dependenciesβ Whether to parse dependencies when generating bindings.--cleanβ Whether to use a new temporary directory for expanding macros. Lowkey affects performance, but might be required in certain build processes.--crate <CRATE_NAME>β If generating bindings for a crate, the specific crate to generate bindings for.-o,--output <PATH>β The file to output the bindings to.--lockfile <PATH>β Specify the path to theCargo.lockfile explicitly. If this is not specified, theCargo.lockfile is searched for in the same folder as theCargo.tomlfile. This option is useful for projects that use workspaces.--metadata <PATH>β Specify the path to the output of acargo metadatacommand that allows to get dependency information. This is useful because cargo metadata may be the longest part of cbindgen runtime, and you may want to share it across cbindgen invocations. By default cbindgen will runcargo metadata --all-features --format-version 1 --manifest-path <path/to/crate/Cargo.toml>.--profile <PROFILE>β Specify the profile to use when expanding macros. Has no effect otherwise. Possible values:Debug,debug,Release,release.-q,--quietβ Report errors only (overrides verbosity options).--depfile <PATH>β Generate a depfile at the given Path listing the source files cbindgen traversed when generating the bindings. Useful when integrating cbindgen into 3rd party build-systems. This option is ignored if--outis missing.--symfile <PATH>β Generate a list of symbols at the given Path. This list can be given to a linker in order to compile an application that exposes dynamic symbols. Useful when creating a plugin system with a C interface.-h,--helpβ Print help.-V,--versionβ Print version.
π SEE ALSO π
The full documentation for cbindgen is maintained as a Texinfo manual. If the info and cbindgen programs are properly installed at your site, the command
info cbindgen
should give you access to the complete manual. iykyk β go get that complete-manual energy, bestie πβ¨
mwah π β signed off by the cbindgen 0.29.4 source/version, dated July 2026. bye bestie π«Άβ¨
π¦ where this page comes from
- ubuntu stonking: cbindgen 0.29.4+dfsg-1 Β· MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms