Skip to content

clockwork-kitten/template-tauri

Repository files navigation

template-tauri

A Tauri 2.0 + SvelteKit project template.

Structure

src/            — SvelteKit frontend
src-tauri/      — Rust backend (minimal — OS access, IPC only)

Setup

# Install JS dependencies
bun install

# Install Rust (if not already)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Copy env file
cp .env.example .env

# Start dev
bun run dev

Scripts

Command Description
bun run dev Start Tauri dev window
bun run build Build production app
bun run check tsc + knip + eslint + bun audit
bun run test Vitest with coverage
bun run ci check + test (same as CI)

Architecture

  • Frontend (src/) — SvelteKit with adapter-static. All UI and business logic lives here.
  • Rust backend (src-tauri/) — Minimal. Use Tauri commands only for OS-level access, file system operations, and IPC. Business logic stays in TypeScript.

Gotchas

  • adapter-static is required for Tauri — do not swap to adapter-node.
  • All Tauri commands must have explicit typed payloads on both the Rust and TypeScript sides.
  • target/ (Rust build output) is gitignored — first build will take a while.
  • Secrets in .env — never commit it. See .env.example.
  • Run bun outdated before starting new feature work; commit dep updates separately.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors