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:
Bossiara13 2026-05-15 01:32:17 +03:00
parent b257f03f65
commit 429113175a

View 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());
}