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/aien-sovereign-core/blob/main/crates/spark-max-cabi/build.rs # aien-sovereign-core Autonomous sovereign intelligence engine and runtime core 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 `aien-sovereign-core / crates / spark-max-cabi / build.rs` 23 lines ยท 835 bytes Raw Blame History 1 use std::process::Command; 2 use std::path::Path; 3 4 fn main() { 5 println!("cargo:rerun-if-changed=mojo/spark_max_bridge.mojo"); 6 let out_dir = std::env::var("OUT_DIR").unwrap(); 7 let dest_path = Path::new(&out_dir).join("libspark_max.so"); 8 9 if let Ok(status) = Command::new("mojo") 10 .args(&["build", "--emit", "shared-lib", "mojo/spark_max_bridge.mojo", "-o"]) 11 .arg(&dest_path) 12 .status() 13 { 14 if status.success() { 15 println!("cargo:rustc-env=SPARK_MAX_SO_BUILT={}", dest_path.display()); 16 let _ = std::fs::copy(&dest_path, "mojo/libspark_max.so"); 17 } else { 18 println!("cargo:warning=mojo build exited with non-zero status"); 19 } 20 } else { 21 println!("cargo:warning=mojo binary not found on PATH, skipping libspark_max.so build"); 22 } 23 }