Cargo Features

libbpf-rs has no features set by default.

[dependencies]
libbpf-rs = { version = "0.24.7", features = ["static", "vendored", "generate-test-files", "dont-generate-test-files"] }
default build

By default the crate uses a vendored libbpf, but requires other necessary libs to be present on the system.

Enables vendored-libbpf of libbpf-sys

static build

Link all required libraries statically.

Enables static of libbpf-sys

vendored build

Use vendored versions of all required libraries.

Enables vendored of libbpf-sys

generate-test-files build

Below here are dev-mostly features that should not be needed by regular users.

Enable this feature to opt in to the generation of unit test files.
Having these test files created is necessary for running tests.

Enables tempfile, vendored-libbpf of libbpf-sys

dont-generate-test-files

Disable generation of test files. This feature takes preference over generate-test-files.

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

libbpf-sys build default generate-test-files? static? vendored?