[bug] STATUS_ENTRYPOINT_NOT_FOUND when using `tauri::Window` in library tests on Windows
Describe the bug
I am encountering a STATUS_ENTRYPOINT_NOT_FOUND (0xc0000139) error when running cargo test on Windows.
The issue occurs in a library crate that depends on tauri (v2.x).
Specifically, if a function signature in the library references tauri::Window (e.g., Option<tauri::Window>), and this function is called (or even just linked) in a test, the test process fails to start with STATUS_ENTRYPOINT_NOT_FOUND.
This happens even without any other dependencies (like image). The mere presence of tauri::Window in the test binary's symbol table seems to trigger this on Windows.
Reproduction
- Environment: Windows 10/11, Rust stable.
- Setup: Create a Cargo workspace.
- Crate: Create a library crate (e.g.,
repro) within the workspace. - Dependencies: Add
tauritorepro/Cargo.toml. - Code: In
repro/src/lib.rs:
// Function that references tauri::Window
pub fn use_window(_window: Option<tauri::Window>) {
println!("Using window");
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_repro() {
// Calling this triggers the error
use_window(None);
}
}
- Run: Execute
cargo test -p repro.
Expected behavior
The test should pass (or fail normally).
Actual Behavior
The test executable fails to start. Output:
error: test failed, to rerun pass `-p repro --lib`
Caused by:
process didn't exit successfully: ... (exit code: 0xc0000139, STATUS_ENTRYPOINT_NOT_FOUND)
Full tauri info output
[✔] Environment
- OS: Windows 10.0.26200 x86_64 (X64)
✔ WebView2: 142.0.3595.94
✔ MSVC: Visual Studio 生成工具 2022
✔ rustc: 1.91.1 (ed61e7d7e 2025-11-07)
✔ cargo: 1.91.1 (ea2d97820 2025-10-10)
✔ rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (overridden by environment variable RUSTUP_TOOLCHAIN)
- node: 24.11.1
- pnpm: 10.22.0
- npm: 11.6.2
[-] Packages
- tauri-cli 🦀: 2.9.4
[-] Plugins
[-] App
Stack trace
Additional context
No response
does it help if you add default-features = false to the tauri dependency? most of them (except wry perhaps) shouldn't be required for library crates.
Can i work on this issue? please lmk
sure you can but we can't give you many pointers right now except to check whether https://github.com/tauri-apps/tauri/issues/13419 and https://github.com/tauri-apps/tauri/issues/13948 are related