Skip to content

Commit 26b027b

Browse files
directcuteoclaude
andcommitted
Separate vendored and authored crates into distinct directories
Move authored crates to crates/ and vendored/forked crates to vendored/ to clearly distinguish first-party from third-party code, as requested in PR review. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6a9967a commit 26b027b

File tree

179 files changed

+32
-29
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+32
-29
lines changed

Cargo.toml

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,37 @@
11
[workspace]
22
members = [
3-
"bpf-recorder",
4-
"bpf-ring-buffer",
5-
"ebpf-kern",
6-
"ebpf-kern/macros",
7-
"ebpf-user",
8-
"ebpf-user/macros",
9-
"mina-recorder",
10-
"mina-aggregator",
11-
"radiation",
12-
"radiation/macros",
13-
"tester",
14-
"mina-ipc",
15-
"simulator",
16-
"topology-tool",
3+
# Authored crates
4+
"crates/bpf-recorder",
5+
"crates/bpf-ring-buffer",
6+
"crates/mina-recorder",
7+
"crates/mina-aggregator",
8+
"crates/mina-ipc",
9+
"crates/simulator",
10+
"crates/tester",
11+
"crates/topology-tool",
12+
# Vendored crates
13+
"vendored/ebpf-kern",
14+
"vendored/ebpf-kern/macros",
15+
"vendored/ebpf-user",
16+
"vendored/ebpf-user/macros",
17+
"vendored/radiation",
18+
"vendored/radiation/macros",
1719
]
1820
resolver = "2"
1921

2022
[workspace.dependencies]
21-
# Workspace internal crates
22-
ebpf-kern = { path = "ebpf-kern" }
23-
ebpf-kern-macros = { version = "0.2.0", path = "ebpf-kern/macros" }
24-
ebpf-user = { path = "ebpf-user" }
25-
ebpf-user-macros = { version = "0.2.0", path = "ebpf-user/macros" }
26-
bpf-ring-buffer = { version = "=0.1.0", path = "bpf-ring-buffer" }
27-
mina-recorder = { path = "mina-recorder" }
28-
radiation = { path = "radiation" }
29-
radiation-macros = { version = "=0.3.1", path = "radiation/macros" }
30-
mina-ipc = { path = "mina-ipc" }
31-
simulator = { path = "simulator" }
23+
# Authored crates
24+
bpf-ring-buffer = { version = "=0.1.0", path = "crates/bpf-ring-buffer" }
25+
mina-recorder = { path = "crates/mina-recorder" }
26+
mina-ipc = { path = "crates/mina-ipc" }
27+
simulator = { path = "crates/simulator" }
28+
# Vendored crates
29+
ebpf-kern = { path = "vendored/ebpf-kern" }
30+
ebpf-kern-macros = { version = "0.2.0", path = "vendored/ebpf-kern/macros" }
31+
ebpf-user = { path = "vendored/ebpf-user" }
32+
ebpf-user-macros = { version = "0.2.0", path = "vendored/ebpf-user/macros" }
33+
radiation = { path = "vendored/radiation" }
34+
radiation-macros = { version = "=0.3.1", path = "vendored/radiation/macros" }
3235

3336
# Proc-macro utilities
3437
proc-macro2 = "1.0"

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ RUN cargo install bpf-linker --git ${linker_src}
3131
# RUN cargo install --git https://github.com/openmina/mina-network-debugger bpf-recorder --bin bpf-recorder
3232
COPY . .
3333
RUN CARGO_TARGET_DIR=target/bpf cargo rustc --package=bpf-recorder --bin=bpf-recorder-kern --features=kern --no-default-features --target=bpfel-unknown-none -Z build-std=core --release -- -Cdebuginfo=2 -Clink-arg=--disable-memory-builtins -Clink-arg=--btf
34-
RUN cargo install --path bpf-recorder bpf-recorder
35-
RUN cargo install --path mina-aggregator mina-aggregator
36-
RUN cargo install --path topology-tool topology-tool
34+
RUN cargo install --path crates/bpf-recorder bpf-recorder
35+
RUN cargo install --path crates/mina-aggregator mina-aggregator
36+
RUN cargo install --path crates/topology-tool topology-tool
3737

3838
FROM ubuntu:20.04
3939

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn build_bpf() {
1414
let git_hash = String::from_utf8(output.stdout).unwrap();
1515
println!("cargo:rustc-env=GIT_HASH={}", git_hash);
1616

17-
let target_dir = env::var("CARGO_TARGET_DIR").unwrap_or_else(|_| "../target".to_string());
17+
let target_dir = env::var("CARGO_TARGET_DIR").unwrap_or_else(|_| "../../target".to_string());
1818
let target_dir = format!("{}/bpf", target_dir);
1919

2020
// let args = &[

0 commit comments

Comments
 (0)