Tauri has been successfully configured! The desktop app shares the same codebase as the web app.
- ✅ Tauri CLI installed (
@tauri-apps/cli) - ✅ Project structure created (
src-tauri/directory) - ✅ Configuration set up (
src-tauri/tauri.conf.json) - ✅ App icons generated (all platforms)
- ✅ Package scripts added (
npm run tauri:dev,npm run tauri:build) - ✅ Window settings: 1280x800, resizable, min 800x600
You need to install Rust (one-time setup):
Option 1: Using winget (recommended)
winget install Rustlang.RustupOption 2: Manual install
- Download from rustup.rs
- Run the installer
- Restart your terminal/PowerShell
Option 3: Using Chocolatey
choco install rustAfter installing, verify:
rustc --versionYou should see something like rustc 1.xx.x
npm run tauri:devThis will:
- Start the Vite dev server (http://localhost:8080)
- Compile the Rust backend
- Launch the desktop app window
- Enable hot-reload for frontend changes
First run takes longer (~2-5 minutes) as Rust compiles dependencies. Subsequent runs are much faster.
npm run tauri:buildOutput locations:
- Windows:
src-tauri/target/release/bundle/msi/(installer) - Windows:
src-tauri/target/release/bundle/nsis/(installer) - Executable:
src-tauri/target/release/just-roll-crits.exe
The app is configured via src-tauri/tauri.conf.json:
- Product Name: Just Roll Crits
- Identifier: com.justrollcrits.app
- Window Size: 1280x800 (minimum 800x600)
- Frontend: Loads from
../dist(Vite build output) - Dev Server: http://localhost:8080
Edit src-tauri/tauri.conf.json:
{
"app": {
"windows": [
{
"title": "Your Title",
"width": 1280,
"height": 800,
"minWidth": 800,
"minHeight": 600,
"resizable": true,
"fullscreen": false,
"decorations": true,
"transparent": false
}
]
}
}Icons are in src-tauri/icons/. To regenerate from a custom image:
# Place your 1024x1024 PNG in the project root
npm run tauri icon your-icon.pngInstall Rust via rustup (see Prerequisites above)
First build compiles all dependencies (~2-5 min). Subsequent builds are faster.
Tauri will auto-download WebView2 on first run. If issues persist, manually install from Microsoft.
Change the port in both:
vite.config.ts→server.portsrc-tauri/tauri.conf.json→build.devUrl
After building, distribute the installer:
Windows:
.msiinstaller insrc-tauri/target/release/bundle/msi/- Or
.exeinstaller insrc-tauri/target/release/bundle/nsis/ - Users need Windows 10+ (WebView2)
macOS:
.dmginsrc-tauri/target/release/bundle/dmg/- May need code signing for distribution
Linux:
.debinsrc-tauri/target/release/bundle/deb/.AppImagefor universal distribution
You can deploy as both:
- Web App (PWA): Deploy
dist/folder to any static host - Desktop App: Distribute the built executable
Both use the same codebase with zero code changes!
- Install Rust:
winget install Rustlang.Rustup - Restart terminal
- Run:
npm run tauri:dev - Wait for first build (2-5 minutes)
- Desktop app launches!
For more details, see DESKTOP_DEPLOYMENT.md