Cbindgen-0.24.3

Introduction to Cbindgen

Cbindgen can be used to generate C bindings for Rust code.

[Note]

Note

Development versions of BLFS may not build or run some packages properly if dependencies have been updated since the most recent stable versions of the book.

Package Information

cbindgen Dependencies

Required

rustc-1.67.0

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/cbindgen

Installation of cbindgen

[Note]

Note

As with most Rust packages, this needs a network connection to check the current versions of the required cargo crates, and to download them if they are not already present.

Install cbindgen by running the following commands:

cargo build --release

To test the results, issue: cargo test. Three tests in the final suite are known to fail.

Now, as the root user:

install -Dm755 target/release/cbindgen /usr/bin/

Contents

Installed Program: cbindgen
Installed Library: none
Installed Directory: none

Short Descriptions

cbindgen

generates C bindings for Rust code