tauri-apps/tauri
Getting started
This page covers building the Tauri repo itself — not building applications with Tauri. If you only want to ship a Tauri app, install the prerequisites at https://v2.tauri.app/start/prerequisites/ and run npm create tauri-app@latest.
Prerequisites
- Rust ≥ 1.77.2 (workspace
rust-version). The Node CLI crate (packages/cli) requires1.88. - Node.js ≥ 18 and pnpm 10.30.3 (pinned in
package.json#packageManager). - Platform-specific WebView and toolchain dependencies. On Linux this includes
webkit2gtk-4.1and friends; see https://v2.tauri.app/start/prerequisites/. - Optional:
cargo-vet,cargo-udeps,cargo-fmt,clippyfor the same checks CI runs.
Clone and bootstrap
git clone https://github.com/tauri-apps/tauri
cd tauri
pnpm install
pnpm build # builds @tauri-apps/cli (native) and @tauri-apps/apipnpm build first builds every workspace package except the API (pnpm run -F !api build), then builds the API last. The CLI build invokes napi-rs to compile crates/tauri-cli as a native Node addon under packages/cli/.
Common commands
| Goal | Command |
|---|---|
| Run the API example app (live reload) | pnpm example:api:dev |
| Run the helloworld example | cargo run --example helloworld --manifest-path crates/tauri/Cargo.toml |
| Run all Rust tests in the core crate | cargo test -p tauri --all-features |
| Run JS unit tests across packages | pnpm test |
| TypeScript type check across packages | pnpm ts:check |
| ESLint across packages | pnpm eslint:check |
| Prettier (write) | pnpm format |
| Prettier (check, CI behaviour) | pnpm format:check |
| Build only the JS API | pnpm build:api |
| Build only the Node CLI | pnpm build:cli |
| Run the Rust CLI directly | cargo run -p tauri-cli -- <subcommand> |
| Install the Rust CLI globally | cargo install --path crates/tauri-cli |
Pointing a downstream app at this checkout
To test changes against a real app, replace the dependency in the app's src-tauri/Cargo.toml:
tauri = { path = "/abs/path/to/tauri/crates/tauri" }
tauri-build = { path = "/abs/path/to/tauri/crates/tauri-build" }If you also need to override the CLI, install it from this checkout (cargo install --path crates/tauri-cli) so cargo tauri picks up your local copy.
CI workflows
The CI matrix lives under .github/workflows/. The most common ones for contributors are:
test-core.yml— Rust core tests on Linux/macOS/Windows.test-cli-rs.yml/test-cli-js.yml— CLI tests.test-android.yml— Android build smoke test.lint-rust.yml/lint-js.yml/fmt.yml— clippy, eslint, prettier.audit.yml/supply-chain.yml—cargo auditandcargo vet.udeps.yml— unused dependency check.
Run the same things locally with cargo clippy --workspace --all-targets -- -D warnings, cargo fmt --all -- --check, pnpm eslint:check, and pnpm format:check.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.