Simple project template for Tauri and React.
- React / TypeScript frontend
- ESLint + Prettier configured
- Tailwind CSS w/ PostCSS configured
- Simple and fast Vite config w/ HMR in development and optimizations for production builds
- Github Actions for testing and building\release
- Install Tauri Prerequisites
- Clone and install dependencies (this template uses
pnpm
by default):
pnpm i
A Tauri app has at least two processes:
- the Core Process (
backend
, or main process in Electron terminology), and - the WebView process (
frontend
, or renderer in Electron)
Both back- and frontend start with a single command:
pnpm dev
pnpm test
Backend code lives in src-tauri/
(Following commands are to be run from there.)
If you have cargo-outdated installed:
cargo outdated
If you have cargo-edit installed:
cargo upgrade
- The
dev
command has by defaultRUST_BACKTRACE=1
set which makes Rust output full backtraces to the console. (Remove it from thepackage.json
command if you don't want it). - If you use VS Code, you can debug Rust code with the included
Debug Tauri
config.
The project has GitHub Actions set up which will automatically test and build your app with every push and PR. For building manually:
pnpm build
- Bump version number (In
package.json
, andsrc-tauri/tauri.conf.json
) - Run
pnpm check
to updateCargo.lock
- Tag the commit you want to release with
vX.Y.Z
- Edit the release notes and push (also tags!)
- Github workflow will automatically build a new draft release for this version. Publish when ready ๐