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).
12 lines
387 B
Rust
12 lines
387 B
Rust
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());
|
|
}
|