build(core): add build.rs so cargo test links against libvosk
cargo test on jarvis-core was failing with `LNK1181 cannot open input file "libvosk.lib"`. The link-search path is declared in jarvis-app's build.rs (and jarvis-cli's), but the test binary for jarvis-core has no such config and the workspace .cargo/config.toml didn't cover it. Adds a minimal build.rs that emits `cargo:rustc-link-search=native=...` pointing at lib/windows/amd64 (resolved relative to CARGO_MANIFEST_DIR, no hardcoded absolute paths so the project still builds for anyone cloning under a different drive/path). Verified: cargo test -p jarvis-core --lib commands::tests now passes 3/3 (every_command_toml_parses, lua_command_scripts_exist, every_command_has_phrases).
This commit is contained in:
parent
b257f03f65
commit
429113175a
1 changed files with 12 additions and 0 deletions
12
crates/jarvis-core/build.rs
Normal file
12
crates/jarvis-core/build.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
fn main() {
|
||||
let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR");
|
||||
|
||||
let lib_path = PathBuf::from(&manifest_dir)
|
||||
.parent().expect("crate parent")
|
||||
.parent().expect("workspace parent")
|
||||
.join("lib").join("windows").join("amd64");
|
||||
|
||||
println!("cargo:rustc-link-search=native={}", lib_path.display());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue