Set up a Tauri 2 + SolidJS desktop app on Windows
Tauri 2 lets you ship a native desktop app with a web frontend and a Rust core, for a fraction of the size of an Electron build. This is the stack we use for our own apps, so here is the shortest path from nothing to a running window on Windows.
Prerequisites
You need three things installed once:
- Rust via rustup.
- Node.js (LTS) for the frontend tooling.
- The Microsoft C++ Build Tools and WebView2 runtime. WebView2 ships with current Windows 11, so most machines already have it.
Verify Rust is on your path:
rustc --versioncargo --versionCreate the project
Tauri ships a scaffolder. Pick SolidJS with TypeScript when prompted:
npm create tauri-app@latest# Project name: my-app# Frontend language: TypeScript# UI template: Solid# UI flavor: TypeScriptThen install and run:
cd my-appnpm installnpm run tauri devA native window opens with hot reload. Edit src/App.tsx and the window updates
instantly.
Call Rust from the frontend
The whole point of Tauri is a typed bridge to Rust. Define a command in
src-tauri/src/lib.rs:
#[tauri::command]fn greet(name: &str) -> String { format!("Hello, {name}!")}Register it in the builder:
tauri::Builder::default() .invoke_handler(tauri::generate_handler![greet]) .run(tauri::generate_context!()) .expect("error while running app");Call it from SolidJS:
import { invoke } from "@tauri-apps/api/core";
const message = await invoke<string>("greet", { name: "world" });Build a release
npm run tauri buildYou get a signed-ready .msi and .exe installer under
src-tauri/target/release/bundle/. The binary is small because the UI runs in the
system WebView instead of bundling a browser.
Where to go next
- Add auto-updates with the Tauri updater plugin and a release feed.
- Lock down the capabilities file so the frontend can only call what it needs.
- Keep the Rust side thin: do the heavy lifting there, keep the UI declarative.
That is the same foundation our desktop products are built on. If you want help taking an idea from this starting point to something you can ship, get in touch.