How to run Tauri Desktop App
commands I ran to take this Windows host from "no Rust" to "running Tauri desktop app":
1. Detect prerequisites
# Existing C++ toolchain?
$vsw = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
& $vsw -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
# Rust/cargo/linker present?
Get-Command rustup -ErrorAction SilentlyContinue
Test-Path "$env:USERPROFILE\.cargo\bin\cargo.exe"
Get-Command link.exe, cl.exe -ErrorAction SilentlyContinue
2. Install Rust
winget install --id Rustlang.Rustup -e `
--accept-package-agreements --accept-source-agreements --silent
3. Activate MSVC toolchain
$env:PATH = "$env:USERPROFILE\.cargo\bin;$env:PATH"
& "$env:USERPROFILE\.cargo\bin\rustup.exe" default stable-msvc
& "$env:USERPROFILE\.cargo\bin\rustc.exe" --version # verify
& "$env:USERPROFILE\.cargo\bin\cargo.exe" --version # verify
4. Copy project off WSL share to local disk
New-Item -ItemType Directory -Path C:\dev # only if missing
robocopy "\\wsl.localhost\Ubuntu-22.04\home\son\r3nk\workbrain" `
"C:\dev\workbrain" /E `
/XD node_modules target .next out .turbo `
/XF "*.log" /NFL /NDL /NP /R:1 /W:1
5. Check port collision
Get-NetTCPConnection -LocalPort 3000 -State Listen
Get-NetTCPConnection -LocalPort 3001 -State Listen
# Found WSL relay holding port 3000 → had to move our Next dev to 3010
6. Rewire Tauri devUrl to port 3010
Edited src-tauri/tauri.conf.json:
- "beforeDevCommand": "pnpm dev",
- "devUrl": "http://localhost:3000",
+ "beforeDevCommand": "pnpm dev -p 3010",
+ "devUrl": "http://localhost:3010",
7. Install JS deps
Set-Location C:\dev\workbrain
pnpm install
8. Launch the app (background, with logs)
New-Item -ItemType Directory C:\dev\workbrain\logs # if missing
$env:PATH = "$env:USERPROFILE\.cargo\bin;$env:PATH"
Start-Process -FilePath "pnpm.cmd" -ArgumentList "tauri","dev" `
-WorkingDirectory "C:\dev\workbrain" `
-RedirectStandardOutput "C:\dev\workbrain\logs\tauri-dev.out.log" `
-RedirectStandardError "C:\dev\workbrain\logs\tauri-dev.err.log" `
-PassThru
9. Monitor the build / confirm window opened
# Tail build progress
Get-Content C:\dev\workbrain\logs\tauri-dev.err.log -Tail 30
# Confirm the desktop window process
Get-Process WorkBrain | Select-Object Id, ProcessName, StartTime, MainWindowTitle
To stop later
Get-Process workbrain, pnpm, node, cargo, rustc -ErrorAction SilentlyContinue | Stop-Process
To restart (cargo cache is warm — fast)
cd C:\dev\workbrain
pnpm tauri:dev
stay in the current window and prepend cargo for just this session:
set PATH=%USERPROFILE%\.cargo\bin;%PATH%
No Comments