Files
sword_rs/build.rs
T
Greg Hellings 0c3e46497c Better wrapping with Rust
Trying to hide most of the CXX nastiness behind the actual module
Move the CXX ffi stuff to its own module
Separate mgr and module mods
Modify main.rs to use the basic code we have done so far
2025-02-24 23:18:38 -06:00

18 lines
500 B
Rust

use system_deps;
fn main() {
let deps = system_deps::Config::new().probe().unwrap();
cxx_build::bridge("src/cxx/mod.rs")
.file("src/cxx/mgr.cc")
.includes(deps.all_include_paths())
.cpp_link_stdlib("stdc++")
.flag("-Os")
.compile("sword_rs");
println!("cargo:rerun-if-changed=src/mgr.rs");
println!("cargo:rerun-if-changed=src/cxx/mgr.cc");
println!("cargo:rerun-if-changed=src/cxx/mgr.h");
println!("cargo:rustc-link-lib=sword");
}