Blog: Generating Rust FFI Bindings to C/C++ Libraries at `cargo build` time in `build.rs` with `libbindgen`

Maintaining multiple sets of bindings for each platform your crate supports is tedious and unfortunate. Instead, this tutorial dives into how to generate the bindings on-the-fly inside build.rs with libbindgen.

8 Likes