Skip to content

Bug: cargo tauri dev fails because tun-service is not staged into src-tauri/binaries #47

Description

@Mirzaliev

Description

Running the project in development mode on Windows fails because Tauri expects tun-service-x86_64-pc-windows-msvc.exe to exist in src-tauri/binaries, but scripts/build-tun-service.ts only stages the binary for release builds.

As a result, cargo tauri dev (or deno task tauri dev) fails even though tun-service is successfully compiled.

Environment

  • OS: Windows 11 x64
  • Rust target: x86_64-pc-windows-msvc
  • Tauri 2

Steps to reproduce

  1. Clone the repository.
  2. Run:
deno task download-binaries
  1. Run:
deno task tauri dev

Actual result

The build fails with:

resource path `binaries\tun-service-x86_64-pc-windows-msvc.exe` doesn't exist

Investigation

deno task build:tun-service successfully builds:

src-tauri/target/debug/tun-service.exe

However, in scripts/build-tun-service.ts there is an early exit for non-release builds:

if (!releaseFlag) {
    process.exit(0);
}

Because of this, the binary is never copied to:

src-tauri/binaries/tun-service-x86_64-pc-windows-msvc.exe

while Tauri still expects it to exist during cargo tauri dev.

Manually copying:

src-tauri/target/debug/tun-service.exe

to

src-tauri/binaries/tun-service-x86_64-pc-windows-msvc.exe

allows the build to proceed.

Expected behavior

Either:

  • stage tun-service into src-tauri/binaries for development builds as well, or
  • avoid requiring it from externalBin during cargo tauri dev.

At the moment the development workflow appears inconsistent: the helper script intentionally skips staging in debug mode, while the Tauri build still requires the staged binary.

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions