With a little help, we now have VerseKey
Went with a basic wrapper that cxx is able to handle for the bridge between the languages, along with simple wrapper methods
This commit is contained in:
@@ -1,23 +1,21 @@
|
||||
use system_deps;
|
||||
|
||||
fn main() {
|
||||
let sources = vec!["key", "mgr", "module", "versekey", "versification"];
|
||||
let deps = system_deps::Config::new().probe().unwrap();
|
||||
|
||||
cxx_build::bridge("src/cxx/mod.rs")
|
||||
.file("src/cxx/mgr.cc")
|
||||
.file("src/cxx/module.cc")
|
||||
.file("src/cxx/versification.cc")
|
||||
let mut build = cxx_build::bridge("src/cxx/mod.rs");
|
||||
for src in sources {
|
||||
build.file(&format!("src/cxx/{}.cc", src));
|
||||
println!("cargo:rerun-if-changed=src/cxx/{}.cc", src);
|
||||
println!("cargo:rerun-if-changed=src/cxx/{}.h", src);
|
||||
}
|
||||
build
|
||||
.includes(deps.all_include_paths())
|
||||
.cpp_link_stdlib("stdc++")
|
||||
.flag("-Os")
|
||||
.compile("sword_rs");
|
||||
|
||||
println!("cargo:rerun-if-changed=src/cxx/mod.rs");
|
||||
println!("cargo:rerun-if-changed=src/cxx/mgr.cc");
|
||||
println!("cargo:rerun-if-changed=src/cxx/mgr.h");
|
||||
println!("cargo:rerun-if-changed=src/cxx/module.cc");
|
||||
println!("cargo:rerun-if-changed=src/cxx/module.h");
|
||||
println!("cargo:rerun-if-changed=src/cxx/versification.h");
|
||||
println!("cargo:rerun-if-changed=src/cxx/versification.cc");
|
||||
println!("cargo:rustc-link-lib=sword");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user