A cutting-edge desktop application template that combines the latest web technologies with Rust-powered desktop capabilities and experimental web rendering.
This template demonstrates a modern approach to desktop application development by combining:
Make sure you have the following installed:
xcode-select --install
sudo apt update
sudo apt install libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
Clone or use this template
git clone <your-repo-url>
cd template-sveltekit-rolldown-tauri-servo-biome-tailwind-shadcn-bun
Install dependencies
bun install
Install Tauri CLI (if not already installed)
bun add -g @tauri-apps/cli@latest
Start the development server with hot reloading:
bun run dev
This will:
http://localhost:5173
If you want to develop just the web portion:
bun run sveltekit:dev
Build the complete desktop application:
bun run build
Preview the built SvelteKit application:
bun run preview
├── src/ # SvelteKit application source
│ ├── lib/ # Shared components and utilities
│ │ ├── components/ # Reusable Svelte components
│ │ │ └── ui/ # ShadCN UI components
│ │ ├── hooks/ # SvelteKit hooks
│ │ └── utils.ts # Utility functions
│ ├── routes/ # SvelteKit routes (pages)
│ │ ├── +layout.svelte # Root layout component
│ │ ├── +layout.ts # Layout load function
│ │ └── +page.svelte # Home page
│ ├── app.css # Global styles (Tailwind imports)
│ ├── app.d.ts # TypeScript declarations
│ └── app.html # HTML template
├── src-tauri/ # Tauri Rust backend
│ ├── src/ # Rust source code
│ ├── Cargo.toml # Rust dependencies
│ ├── tauri.conf.json # Tauri configuration
│ └── build.rs # Build script
├── static/ # Static assets
├── biome.json # Biome configuration
├── components.json # ShadCN component configuration
├── package.json # Node.js dependencies and scripts
├── svelte.config.js # SvelteKit configuration
├── tsconfig.json # TypeScript configuration
└── vite.config.ts # Vite configuration (with Rolldown)
Script | Description |
---|---|
bun run dev |
Start development server with Tauri app |
bun run build |
Build production desktop application |
bun run sveltekit:dev |
Start only SvelteKit dev server |
bun run sveltekit:build |
Build only SvelteKit application |
bun run preview |
Preview production SvelteKit build |
bun run check |
Run SvelteKit type checking |
bun run check:watch |
Run type checking in watch mode |
bun run tauri |
Access Tauri CLI commands |
This template uses Tailwind CSS v4 with:
Pre-configured with ShadCn Svelte for beautiful, accessible components:
To add new ShadCn components:
bunx shadcn-svelte@latest add button # Example
Biome is configured with:
Run code quality checks:
bunx biome check . # Check all files
bunx biome format . # Format all files
bunx biome lint . # Lint all files
bunx biome check . --fix # Fix auto-fixable issues
This template uses the experimental Servo rendering engine through tauri-runtime-verso
. This provides:
Note: Servo integration is experimental and may have compatibility issues. For production applications, consider using the standard Tauri webview until Servo reaches stability.
Rolldown is used via rolldown-vite
package, providing:
# Build for current platform
bun run build
# Build for specific platforms (configure in tauri.conf.json)
bun run tauri build --target x86_64-pc-windows-msvc # Windows
bun run tauri build --target x86_64-apple-darwin # macOS Intel
bun run tauri build --target aarch64-apple-darwin # macOS Apple Silicon
bun run tauri build --target x86_64-unknown-linux-gnu # Linux
Built applications will be in src-tauri/target/release/bundle/
:
.msi
installer and .exe
executable.dmg
disk image and .app
bundle.deb
package and .appimage
git checkout -b feature/amazing-feature
bunx biome check . --fix
bun run dev
git commit -m 'Add amazing feature'
git push origin feature/amazing-feature
This template is available under the MIT License. See the LICENSE file for more details.
bun run dev
for the full development experienceHappy coding! 🎉 This template represents the cutting edge of desktop application development with web technologies.