@ -43,6 +43,9 @@ pub fn build_ebpf(opts: Options) -> Result<(), anyhow::Error> {
let dir = PathBuf ::from ( "{{project-name}}-ebpf" ) ;
let dir = PathBuf ::from ( "{{project-name}}-ebpf" ) ;
let target = format! ( "--target={}" , opts . target ) ;
let target = format! ( "--target={}" , opts . target ) ;
let mut args = vec! [
let mut args = vec! [
"run" ,
"nightly" ,
"cargo" ,
"build" ,
"build" ,
"--verbose" ,
"--verbose" ,
target . as_str ( ) ,
target . as_str ( ) ,
@ -57,7 +60,7 @@ pub fn build_ebpf(opts: Options) -> Result<(), anyhow::Error> {
// vars set by the cargo xtask command are also inherited. RUSTUP_TOOLCHAIN is removed
// vars set by the cargo xtask command are also inherited. RUSTUP_TOOLCHAIN is removed
// so the rust-toolchain.toml file in the -ebpf folder is honored.
// so the rust-toolchain.toml file in the -ebpf folder is honored.
let status = Command ::new ( " cargo ")
let status = Command ::new ( " rustup ")
. current_dir ( dir )
. current_dir ( dir )
. env_remove ( "RUSTUP_TOOLCHAIN" )
. env_remove ( "RUSTUP_TOOLCHAIN" )
. args ( & args )
. args ( & args )