Template/build.rs
2024-02-07 02:50:48 +03:00

16 lines
352 B
Rust

use std::{env, process::Command};
fn main() {
println!("cargo:rerun-if-changed=src/syscalls.S");
let out_dir = env::var("OUT_DIR").unwrap();
Command::new("fasm")
.arg("src/syscalls.S")
.arg(&format!("{}/libsyscalls.a", out_dir))
.status()
.unwrap();
println!("cargo:rustc-link-search={}", out_dir)
}