BSD Ports

devel/rust-bindgen 0.72.1 OpenBSD

automatically generates Rust FFI bindings (C and C++)

System
OpenBSD
Repository
OpenBSD ports
Maintainer
The OpenBSD ports mailing-list <[email protected]>
Last update
Commit
9327b2d4ef
Categories
devel, lang/rust

Description

bindgen automatically generates Rust FFI bindings to C (and some C++) libraries.

bindgen cli tool takes the path to an input C or C++ header file, and optionally an output file path for the generated bindings. If the output file path is not supplied, the bindings are printed to stdout.

If we wanted to generated Rust FFI bindings from a C header named input.h and put them in the bindings.rs file, we would invoke bindgen like this:

$ bindgen input.h -o bindings.rs

For more details, pass the --help flag: $ bindgen --help

In the other systems

SystemPortVersion
OpenBSDdevel/rust-bindgen0.72.1
NetBSDdevel/rust-bindgen0.72.1

Install

Binary package:

pkg_add rust-bindgen

From the ports tree:

cd /usr/ports/devel/rust-bindgen && make install

Dependencies

Build dependencies 2

Commit history 1

DateCommitCreditsLog message
9327b2d4ef tb rust-bindgen: use llvm/22 to run tests (5 failures)
should unbreak sqlports, as reported by aja