feat: first cut at actual token generation and model loading
This commit is contained in:
18
build.rs
Normal file
18
build.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() != Ok("macos") {
|
||||
return;
|
||||
}
|
||||
|
||||
let metal = Path::new("native/metal/ds4_metal.m");
|
||||
println!("cargo:rerun-if-changed={}", metal.display());
|
||||
cc::Build::new()
|
||||
.include("native/metal")
|
||||
.file(metal)
|
||||
.flag("-fobjc-arc")
|
||||
.opt_level(3)
|
||||
.compile("ds4_metal");
|
||||
println!("cargo:rustc-link-lib=framework=Foundation");
|
||||
println!("cargo:rustc-link-lib=framework=Metal");
|
||||
}
|
||||
Reference in New Issue
Block a user