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:
Greg Hellings
2025-06-25 02:30:42 -05:00
parent fc7b3a7ec5
commit c8dd1ce0f0
12 changed files with 919 additions and 10 deletions
+8 -10
View File
@@ -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");
}