mirror of
https://github.com/sched-ext/scx.git
synced 2024-12-01 07:00:23 +00:00
2ac1a5924f
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>
10 lines
231 B
Rust
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();
|
|
}
|