scx-upstream/scheds/rust/scx_rustland/build.rs
Andrea Righi 2ac1a5924f scx_rustland_core: introduce RustLandBuilder()
Introduce a wrapper to scx_utils::BpfBuilder that can be used to build
the BPF component provided by scx_rustland_core.

The source of the BPF components (main.bpf.c) is included in the crate
as an array of bytes, the content is then unpacked in a temporary file
to perform the build.

The RustLandBuilder() helper is also used to generate bpf.rs (that
implements the low-level user-space Rust connector to the BPF
commponent).

Schedulers based on scx_rustland_core can simply use RustLandBuilder(),
to build the backend provided by scx_rustland_core.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2024-02-28 17:49:44 +01:00

10 lines
231 B
Rust

// This software may be used and distributed according to the terms of the
// GNU General Public License version 2.
fn main() {
scx_rustland_core::RustLandBuilder::new()
.unwrap()
.build()
.unwrap();
}