Dev Environment Setup
Set up a local development environment for WinSTT (Rust + Tauri) from scratch
Everything you need to clone, install, and run WinSTT locally. WinSTT is a single Tauri 2 app — a Rust backend plus a Vite/React renderer — so there is one process to build and run, no Python server and no second terminal.
No Python, no model server
There is no stt-server, no uv, and no Python. STT and TTS run in-process in Rust on ONNX
Runtime. Models are downloaded from HuggingFace on first use — there is no model-install step
in dev setup.
Platform note
WinSTT targets macOS, Linux, and Windows. This page focuses on the Windows helper-script
path because those scripts set up MSVC, vcvars, and native dependency paths for local
development. Linux and macOS use the same bun/cargo/tauri commands with their
platform Tauri dependencies; the CI workflows are the source of truth for those packages.
Prerequisites
Install these before you clone. Each one feeds a specific part of the build — the Rust
backend, the native -sys crates, or the renderer.
| Tool | Purpose | Install |
|---|---|---|
| Git | Version control | Download |
| Rust (stable, MSVC) | Backend toolchain (cargo) | rustup → default stable-x86_64-pc-windows-msvc |
| Visual Studio Build Tools | MSVC linker + Windows SDK (the Desktop C++ workload) | Required for any Rust-on-Windows build |
| LLVM / Clang | libclang for bindgen (native -sys crates) | Set LIBCLANG_PATH to its bin/ |
| CMake + Ninja | Build the native sherpa-onnx deps (wake word / diarization) | On PATH |
| Bun | JS runtime + package manager + renderer dev server | Download |
| WebView2 Runtime | The webview Tauri renders into | Preinstalled on Windows 11; install the Evergreen runtime on Windows 10 |
Optional extras, only if you want GPU acceleration or local/cloud LLM cleanup:
| Tool | Purpose |
|---|---|
| NVIDIA GPU + CUDA | Build with --features cuda for the CUDA execution provider (DirectML works out of the box, no CUDA needed) |
| Ollama | Local LLM cleanup / custom transforms |
| OpenRouter API key | Cloud LLM alternative to Ollama |
Setup
Install the Rust toolchain
From rustup.rs — installs
cargoplus the MSVC stable toolchain.rustup default stable rustc --versionInstall the native build tools
WinSTT links MSVC and builds a few native C/C++ dependencies, so you need the C++ toolchain, LLVM (for
bindgen), and CMake + Ninja (forsherpa-onnx):- Visual Studio Build Tools → select the Desktop development with C++ workload.
- LLVM → install and note the
bin/path (e.g.C:\Program Files\LLVM\bin). - CMake and Ninja → on
PATH.
These must be visible to
cargo. The simplest way is to build from a Developer Command Prompt (which runsvcvars64.batfor you), or use the repo'stools/windows/*.bathelpers described below, which set up the MSVC environment andPATHautomatically.Clone and install frontend deps
git clone https://github.com/dahshury/WinSTT cd WinSTT bun install
Running the App
One command builds the Rust backend and launches the renderer's Vite dev server (fixed to port 1420), then opens the Tauri window:
bun run tauri devOn Windows, the easiest path is the bundled helper, which sets up vcvars + PATH
(cargo, bun, LLVM, CMake/Ninja) and runs the command for you:
tools\windows\tauri-dev.batThe Windows helpers
tools/windows/ holds Windows build helpers that wrap cargo/bun in the MSVC environment.
The paths inside them (Visual Studio, LLVM) are machine-specific — edit them to match your
install, or build from a Developer Command Prompt instead.
tauri-dev.bat—bun run tauri dev(long-running; logs totauri_dev.log)tauri-build.bat—bun run tauri build --no-bundlecargo-env.bat check|build— runcargoinsrc-tauri/
Building
bun run tauri build # full build + bundle (installer)
bun run tauri build --no-bundle # exe only, no installercargo build --release is NOT a standalone app
A plain cargo build --release leaves Tauri in dev mode — the webview still loads the
dev URL. Only tauri build embeds the built frontend and produces a standalone executable.
Dev Commands Reference
Backend (src-tauri/)
| Command | Description |
|---|---|
tools\windows\cargo-env.bat check | cargo check --all-targets in the MSVC env |
tools\windows\cargo-env.bat build | cargo build |
bun run format:backend | cargo fmt |
cargo clippy --all-targets -- -D warnings | Lint (the CI gate; run inside the MSVC env) |
Frontend (repo root)
| Command | Description |
|---|---|
bun run dev | Vite renderer only (no Tauri shell) |
bun run tauri dev | Full app (backend + renderer) |
bun run build | tsc + vite build (renderer bundle) |
bun run lint | ESLint over src |
bun run typecheck | TypeScript no-emit check for src and generated spec types |
bun run test | Run the renderer test suite in directory chunks |
bun run test:src:<area> | Run a predictable test chunk when isolating slow or flaky cleanup failures |
bun run check:i18n | Verify 20-locale message parity vs en.json |
bun run check:deadcode | Full Knip check |
bun run check:deadcode:files / :deps / :exports | Isolate Knip cleanup failures by issue type |
bun run check:cleanup | Local cleanup gate: lint + typecheck + full Knip |
bun run docs:dev | This documentation site (port 3001) |
Troubleshooting
Common setup failures and the fix for each — most trace back to a missing native tool that
cargo can't see.
| Symptom | Fix |
|---|---|
link.exe / cl.exe not found, or "MSVC not installed" | Cargo can't see the MSVC toolchain. Install the Desktop development with C++ workload in Visual Studio Build Tools, then build from a Developer Command Prompt or via tools\windows\cargo-env.bat / tauri-dev.bat (they call vcvars64.bat first). |
| "Unable to find libclang" during build | A native -sys crate uses bindgen, which needs libclang. Install LLVM and set LIBCLANG_PATH to its bin/ directory (the tools/windows bats set this for you). |
CMake or Ninja errors building sherpa-onnx | The wake-word / diarization deps build native code. Install CMake and Ninja and ensure both are on PATH (the tools/windows bats add the Visual Studio-bundled copies). |
| The app window is blank / won't open | On Windows 10 the WebView2 runtime may be missing — install the Evergreen WebView2 runtime. Also confirm the Vite dev server came up on port 1420 (it's fixed in tauri.conf.json). |
cargo build --release produces an app that loads a dev URL | That's expected — cargo build alone doesn't embed the frontend. Use bun run tauri build (optionally --no-bundle) to get a standalone executable. |
Related
Backend architecture
How the Rust + Tauri backend is structured — STT, TTS, and the command layer.
Frontend architecture
The Vite/React renderer, stores, and how it talks to the backend.
Install WinSTT
Just want to run the released app? Grab the installer instead of building.
CLI reference
Command-line flags and headless options for the built executable.