tauri-apps/tauri
Development workflow
The day-to-day cycle for Tauri contributors. Everything below assumes you've followed Getting started.
Pick a target
Most issues touch one of these areas. Choosing the right starting point saves a lot of time.
| Affected area | Where to edit | Quickest way to validate |
|---|---|---|
| Rust runtime / app builder | crates/tauri/src/ |
cargo run --example helloworld --manifest-path crates/tauri/Cargo.toml |
| Window/webview behaviour, event loop | crates/tauri-runtime-wry/src/lib.rs |
cargo run --example multiwindow --manifest-path crates/tauri/Cargo.toml --features unstable |
Configuration schema (tauri.conf.json) |
crates/tauri-utils/src/config.rs |
cargo run -p tauri-schema-generator then check the diff |
| ACL types (capabilities, permissions) | crates/tauri-utils/src/acl/ |
cargo test -p tauri-utils |
Macros (#[command], generate_handler!) |
crates/tauri-macros/src/ |
cargo test -p tauri --features compression |
| CLI subcommand (build/dev/init/…) | crates/tauri-cli/src/<subcmd>/ |
cargo run -p tauri-cli -- <subcmd> --help |
| Bundler (DMG/AppImage/MSI/NSIS) | crates/tauri-bundler/src/bundle/ |
Run the bundler against examples/api |
| JS API | packages/api/src/ |
pnpm build:api && pnpm example:api:dev |
| Node CLI wrapper | packages/cli/ |
pnpm build:cli && node packages/cli/main.js --help |
| Mobile (Android / iOS) | crates/tauri/mobile/, crates/tauri-cli/src/mobile/ |
cargo run -p tauri-cli -- android init against an example |
Edit, run, repeat
- Branch off
dev. The default branch for contributions isdev, notmain. - Edit. Use a downstream app or one of the
examples/to exercise your change. The examples crate-set automatically picks up the local Tauri sources because of the[patch.crates-io]block in the workspaceCargo.toml. - Format and lint locally before pushing:
cargo fmt --all cargo clippy --workspace --all-targets -- -D warnings pnpm format pnpm eslint:check pnpm ts:check - Run tests for the crate(s) you touched:
cargo test -p tauri --all-features cargo test -p tauri-utils pnpm test - Re-generate schema files if you changed config or ACL types:
CI'scargo run -p tauri-schema-generatorcheck-generated-files.ymlwill fail if you skip this. - Add a change file under
.changes/. See Tooling — covector. - Push and open a PR against
dev. The PR template lives at.github/PULL_REQUEST_TEMPLATE.md.
Pointing a downstream app at your local checkout
To exercise changes against a real app:
# in your-app/src-tauri/Cargo.toml
[dependencies]
tauri = { path = "/abs/path/to/tauri/crates/tauri" }
[build-dependencies]
tauri-build = { path = "/abs/path/to/tauri/crates/tauri-build" }If you also need the CLI from this checkout:
cargo install --path crates/tauri-cli --debug # --debug speeds up subsequent installsThen cargo tauri dev in your app will run your local CLI which links against the local runtime.
Working on the Node CLI
@tauri-apps/cli is a napi-rs addon over crates/tauri-cli. The TypeScript definitions in packages/cli/index.d.ts are generated by napi-rs; the JS shim in packages/cli/main.js wraps the addon. To rebuild after a change:
pnpm build:cli # release build
pnpm build:cli:debug # fasterThen point a downstream app's package.json at the local checkout (e.g. via pnpm link).
Working on the JS API
The API is built with Rollup. Edit packages/api/src/*.ts, then pnpm build:api. The built artefacts go to packages/api/dist/. For interactive testing, pnpm example:api:dev runs the examples/api app, which depends on the local API package via the workspace.
Submitting a security issue
Do not open a public issue or PR. Use GitHub's Private Vulnerability Disclosure on the repo's "Security" tab. See SECURITY.md for the full policy.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.