Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/openclaw-rs/blob/main/build.rs # openclaw-rs High-performance sovereign agent runtime in native Rust and Mojo for NVIDIA DGX Spark Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `openclaw-rs / build.rs` 32 lines ยท 961 bytes Raw Blame History 1 use std::path::Path; 2 use std::process::Command; 3 4 fn main() { 5 println!("cargo:rerun-if-changed=mojo/openclaw_simd.mojo"); 6 let out_dir = std::env::var("OUT_DIR").unwrap(); 7 let dest_path = Path::new(&out_dir).join("libopenclaw_simd.so"); 8 9 if let Ok(status) = Command::new("mojo") 10 .args([ 11 "build", 12 "--emit", 13 "shared-lib", 14 "mojo/openclaw_simd.mojo", 15 "-o", 16 ]) 17 .arg(&dest_path) 18 .status() 19 { 20 if status.success() { 21 println!( 22 "cargo:rustc-env=OPENCLAW_SIMD_SO_BUILT={}", 23 dest_path.display() 24 ); 25 let _ = std::fs::copy(&dest_path, "mojo/libopenclaw_simd.so"); 26 } else { 27 println!("cargo:warning=mojo build exited with non-zero status"); 28 } 29 } else { 30 println!("cargo:warning=mojo binary not found on PATH, skipping libopenclaw_simd.so build"); 31 } 32 }