diff --git a/{{project-name}}-ebpf/rust-toolchain.toml b/{{project-name}}-ebpf/rust-toolchain.toml deleted file mode 100644 index f70d225..0000000 --- a/{{project-name}}-ebpf/rust-toolchain.toml +++ /dev/null @@ -1,3 +0,0 @@ -[toolchain] -channel = "nightly" -components = ["rust-src"] diff --git a/{{project-name}}/build.rs b/{{project-name}}/build.rs index fa41cc9..e9c7fd5 100644 --- a/{{project-name}}/build.rs +++ b/{{project-name}}/build.rs @@ -59,6 +59,7 @@ fn main() { let mut cmd = Command::new("cargo"); cmd.args([ + "+nightly", "build", "-Z", "build-std=core", @@ -71,8 +72,8 @@ fn main() { cmd.env("CARGO_CFG_BPF_TARGET_ARCH", arch); - // Workaround to make sure that the rust-toolchain.toml is respected. - for key in ["RUSTUP_TOOLCHAIN", "RUSTC", "RUSTC_WORKSPACE_WRAPPER"] { + // Workaround to make sure that the correct toolchain is used. + for key in ["RUSTC", "RUSTC_WORKSPACE_WRAPPER"] { cmd.env_remove(key); } cmd.current_dir(ebpf_dir);