Tauri kit
Start the app kit in a Tauri shell with typed Rust commands and events from the same React app.
For: Teams shipping a desktop app where download size matters more than identical rendering everywhere.
kitr new my-app --kit tauriFirst time? Run npm i -g @kitr/kitr once. Inside a project, the global kitr runs your project's own version.
- kitr dev app
- The Tauri window, with hot reload
- kitr dev site
- The same app in a browser
- kitr build app
- A native bundle; needs Rust installed
The dashboard in Tauri
A small native app that uses the system webview.
Typed Rust commands
app/commands.ts calls the commands in src-tauri/src/lib.rs, with types on both sides.
Events from Rust
Rust emits events with app.emit, and the page listens with useTauriEvent.
A Rust project to grow
platforms/app/src-tauri/ is a normal Cargo project with its capabilities file.
What's inside
Read from the kit's output in the kitr repository, so it matches what kitr new writes today. 18 packages · 12 components · 59 files.
- Platforms
- site: webspaapp: tauri
- Packages
- routerplatformstoragequeryhttpformstablestatetailwindthemetoastauthmockstestingdevtoolssecure-storagenotificationsvite
- Components
- app-shellbadgebuttoncarddata-tableempty-stateformiconinputlabelpage-headertheme-toggle
Every file it writes
Start with app/commands.ts. Pick any file to read it.
import { defineCommands } from '@kitr/tauri/client'
/** Mirrors the `#[tauri::command]` functions in platforms/app/src-tauri/src/lib.rs. */
export type Commands = {
greet: (args: { name: string }) => string
}
/** `await commands.greet({ name })`: typed. Guard with `isTauri()` for web builds. */
export const commands = defineCommands<Commands>()