WinSTT logoWinSTT

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.

1
process to build and run
1420
renderer dev-server port
0
Python or model servers
3
platforms: Windows, macOS, Linux

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.

Required toolchain for a local WinSTT build
ToolPurposeInstall
GitVersion controlDownload
Rust (stable, MSVC)Backend toolchain (cargo)rustup → default stable-x86_64-pc-windows-msvc
Visual Studio Build ToolsMSVC linker + Windows SDK (the Desktop C++ workload)Required for any Rust-on-Windows build
LLVM / Clanglibclang for bindgen (native -sys crates)Set LIBCLANG_PATH to its bin/
CMake + NinjaBuild the native sherpa-onnx deps (wake word / diarization)On PATH
BunJS runtime + package manager + renderer dev serverDownload
WebView2 RuntimeThe webview Tauri renders intoPreinstalled on Windows 11; install the Evergreen runtime on Windows 10

Optional extras, only if you want GPU acceleration or local/cloud LLM cleanup:

Optional — GPU and LLM cleanup
ToolPurpose
NVIDIA GPU + CUDABuild with --features cuda for the CUDA execution provider (DirectML works out of the box, no CUDA needed)
OllamaLocal LLM cleanup / custom transforms
OpenRouter API keyCloud LLM alternative to Ollama

Setup

  1. Install the Rust toolchain

    From rustup.rs — installs cargo plus the MSVC stable toolchain.

    rustup default stable
    rustc --version
  2. Install 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 (for sherpa-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 runs vcvars64.bat for you), or use the repo's tools/windows/*.bat helpers described below, which set up the MSVC environment and PATH automatically.

  3. 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 dev

On 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.bat

The 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.batbun run tauri dev (long-running; logs to tauri_dev.log)
  • tauri-build.batbun run tauri build --no-bundle
  • cargo-env.bat check|build — run cargo in src-tauri/

Building

bun run tauri build          # full build + bundle (installer)
bun run tauri build --no-bundle   # exe only, no installer

cargo 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/)

Backend commands
CommandDescription
tools\windows\cargo-env.bat checkcargo check --all-targets in the MSVC env
tools\windows\cargo-env.bat buildcargo build
bun run format:backendcargo fmt
cargo clippy --all-targets -- -D warningsLint (the CI gate; run inside the MSVC env)

Frontend (repo root)

Frontend commands
CommandDescription
bun run devVite renderer only (no Tauri shell)
bun run tauri devFull app (backend + renderer)
bun run buildtsc + vite build (renderer bundle)
bun run lintESLint over src
bun run typecheckTypeScript no-emit check for src and generated spec types
bun run testRun 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:i18nVerify 20-locale message parity vs en.json
bun run check:deadcodeFull Knip check
bun run check:deadcode:files / :deps / :exportsIsolate Knip cleanup failures by issue type
bun run check:cleanupLocal cleanup gate: lint + typecheck + full Knip
bun run docs:devThis 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.

Setup troubleshooting
SymptomFix
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 buildA 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-onnxThe 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 openOn 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 URLThat's expected — cargo build alone doesn't embed the frontend. Use bun run tauri build (optionally --no-bundle) to get a standalone executable.

On this page