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

Generate the skeleton at path output

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.