OpenBSD Handbook

Current snapshot · amd64 · Generated 2026-09-09

rust-bindgen-0.72.1

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

Back to search · Project homepage

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

Package information

Ports path
devel/rust-bindgen
Package architecture
amd64
Maintainer
The OpenBSD ports mailing-list <ports@openbsd.org>
Categories
devel, lang/rust
Available flavors
None listed

These are ports metadata. Binary availability depends on the release, architecture and mirror. Build and test dependencies are not an installation checklist.

Direct dependencies

Build

Test

Used by (4 dependency relationships)

Includes library, runtime, build and test relationships. Results load 100 at a time.

Installing and updating packages · Package details as JSON