mirror of
https://github.com/JakeHillion/scx.git
synced 2024-11-29 20:50:22 +00:00
Merge pull request #217 from sched-ext/fix-rustland-core-crate
scx_rustland_core: separate crate source code from assets
This commit is contained in:
commit
1c6af78b79
@ -7,12 +7,6 @@ license = "GPL-2.0-only"
|
||||
repository = "https://github.com/sched-ext/scx"
|
||||
description = "Framework to implement sched_ext schedulers running in user space"
|
||||
|
||||
include = [
|
||||
"src/bpf/intf.h",
|
||||
"src/bpf/main.bpf.c",
|
||||
"src/bpf.rs",
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0"
|
||||
libbpf-rs = "0.23"
|
||||
@ -24,3 +18,13 @@ scx_utils = { path = "../scx_utils", version = "0.7" }
|
||||
tar = "0.4"
|
||||
walkdir = "2.4"
|
||||
scx_utils = { path = "../scx_utils", version = "0.7" }
|
||||
|
||||
[lib]
|
||||
name = "scx_rustland_core"
|
||||
path = "src/lib.rs"
|
||||
|
||||
include = [
|
||||
"assets/bpf/intf.h",
|
||||
"assets/bpf/main.bpf.c",
|
||||
"assets/bpf.rs",
|
||||
]
|
||||
|
@ -30,9 +30,9 @@ impl RustLandBuilder {
|
||||
|
||||
pub fn build(&mut self) -> Result<()> {
|
||||
// Embed the BPF source files.
|
||||
let intf = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/bpf/intf.h"));
|
||||
let skel = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/bpf/main.bpf.c"));
|
||||
let bpf = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/src/bpf.rs"));
|
||||
let intf = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/bpf/intf.h"));
|
||||
let skel = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/bpf/main.bpf.c"));
|
||||
let bpf = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/bpf.rs"));
|
||||
|
||||
// Generate BPF backend code (C).
|
||||
self.create_file("intf.h", intf);
|
||||
|
Loading…
Reference in New Issue
Block a user