Crates.io | bcc-sys |
lib.rs | bcc-sys |
version | 0.23.0 |
source | src |
created_at | 2017-10-22 04:17:26.513793 |
updated_at | 2021-11-23 22:43:43.085144 |
description | Rust binding to BPF Compiler Collection (BCC) |
homepage | https://github.com/rust-bpf/bcc-sys |
repository | https://github.com/rust-bpf/bcc-sys |
max_upload_size | |
id | 36526 |
size | 4,071,863 |
Rust binding for bcc.
bcc 0.4.0 - 0.23.0 are supported via feature flags.
Note: If you do not specify a version of bcc using feature flags, the library will expect the latest version of bcc supported by the release of this library. You must specify a version using the matching feature flag to override this behavior.
This library allows static linking of bcc and other libraries required to write BPF utilities in Rust without needing to have bpf/bcc libraries available at runtime. This requires matching the llvm feature flag to your installed version and having specific prerequisites available. See the GitHub Workflow config for more details.
Freshly generated bindings will sometimes be required:
Before you generate fresh bindings, you should have rustfmt
installed on your
system. Install rustfmt
with:
$ rustup component add rustfmt
$ rustup update
You may then build this crate using:
cargo build --features generate
The fresh bindings will be placed into src/bccapi/generated.rs
NOTE: you may need to make changes to build.rs
and/or wrapper.h
to add support for a new version of bcc
To use the newly generated bindings, we must add them to the library.
src/bccapi
.
Follow existing naming conventions.src/bccapi/mod.rs
to add the new module to this library.Cargo.toml
to define a feature for the new bcc version.rustfmt
is required to generate new bindings.