Struct libbpf_cargo::SkeletonBuilder [−][src]
pub struct SkeletonBuilder { /* fields omitted */ }Expand description
SkeletonBuilder builds and generates a single skeleton.
This interface is meant to be used in build scripts.
Examples
use libbpf_cargo::SkeletonBuilder; SkeletonBuilder::new("myobject.bpf.c") .debug(true) .clang("/opt/clang/clang") .generate("/output/path") .unwrap();
Implementations
Create a new builder instance, where source is the path to the BPF object source
(typically suffixed by .bpf.c)
Turn debug output on or off
Default is off
Specify which clang binary to use
Default searchs $PATH for clang
Pass additional arguments to clang when buildling BPF object file
Examples
use libbpf_cargo::SkeletonBuilder; SkeletonBuilder::new("myobject.bpf.c") .clang_args("-DMACRO=value -I/some/include/dir") .generate("/output/path") .unwrap();
Specify whether or not to skip clang version check
Default is false
Specify which rustfmt binary to use
Default searches $PATH for rustfmt
Auto Trait Implementations
impl RefUnwindSafe for SkeletonBuilderimpl Send for SkeletonBuilderimpl Sync for SkeletonBuilderimpl Unpin for SkeletonBuilderimpl UnwindSafe for SkeletonBuilder