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
impl SkeletonBuilder[src]
impl SkeletonBuilder[src]pub fn new<P: AsRef<Path>>(source: P) -> Self[src]
pub fn new<P: AsRef<Path>>(source: P) -> Self[src]Create a new builder instance, where source is the path to the BPF object source
(typically suffixed by .bpf.c)
pub fn debug(&mut self, debug: bool) -> &mut SkeletonBuilder[src]
pub fn debug(&mut self, debug: bool) -> &mut SkeletonBuilder[src]Turn debug output on or off
Default is off
pub fn clang<P: AsRef<Path>>(&mut self, clang: P) -> &mut SkeletonBuilder[src]
pub fn clang<P: AsRef<Path>>(&mut self, clang: P) -> &mut SkeletonBuilder[src]Specify which clang binary to use
Default searchs $PATH for clang
pub fn clang_args<S: AsRef<str>>(&mut self, opts: S) -> &mut SkeletonBuilder[src]
pub fn clang_args<S: AsRef<str>>(&mut self, opts: S) -> &mut SkeletonBuilder[src]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();
pub fn skip_clang_version_check(&mut self, skip: bool) -> &mut SkeletonBuilder[src]
pub fn skip_clang_version_check(&mut self, skip: bool) -> &mut SkeletonBuilder[src]Specify whether or not to skip clang version check
Default is false
pub fn rustfmt<P: AsRef<Path>>(&mut self, rustfmt: P) -> &mut SkeletonBuilder[src]
pub fn rustfmt<P: AsRef<Path>>(&mut self, rustfmt: P) -> &mut SkeletonBuilder[src]Specify which rustfmt binary to use
Default searches $PATH for rustfmt
Auto Trait Implementations
impl RefUnwindSafe for SkeletonBuilder
impl Send for SkeletonBuilder
impl Sync for SkeletonBuilder
impl Unpin for SkeletonBuilder
impl UnwindSafe for SkeletonBuilder
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,