Contributing
Contributions are welcome. Bug reports, feature requests, and pull requests are all appreciated.
Prerequisites
Section titled “Prerequisites”- Rust 1.95.0+ with edition 2024
- A Tauri v2 app for testing (or use the examples)
- Linux (WebKitGTK) or macOS (WebKit) — Windows planned
Development Setup
Section titled “Development Setup”git clone https://github.com/mpiton/tauri-pilot.gitcd tauri-pilotcargo build --workspacecargo test --workspaceCode Standards
Section titled “Code Standards”- No
.unwrap()outside of tests — usethiserror(plugin) oranyhow(CLI) - Clippy strict:
cargo clippy --workspace --all-targets -- -D warnings, then again with the plugin’s debug assertions off, as release builds compile it:cargo clippy --workspace --all-targets --config 'profile.dev.package.tauri-plugin-pilot.debug-assertions=false' -- -D warnings - Modules < 150 lines, functions < 50 lines
- Edition 2024, rust-version 1.95.0
Workflow
Section titled “Workflow”- Fork the repo and create a feature branch from
main - Write tests first (TDD: RED → GREEN → REFACTOR)
- Implement the minimum to pass tests
- Run
cargo test --workspace && cargo clippy --workspace --all-targets -- -D warnings && cargo clippy --workspace --all-targets --config 'profile.dev.package.tauri-plugin-pilot.debug-assertions=false' -- -D warnings - If you touched a
Cargo.tomlor called a newly added API, check the floors too:cargo +nightly update -Z direct-minimal-versions && cargo check --workspace --all-targets --locked. CI runs this as the requiredDirect minimal versionsjob. When it fails, raise the floor inCargo.tomlfor the crate cargo or rustc names. It rewrites the local (gitignored)Cargo.lock, so runcargo updateafterwards to get back to the newest versions. - Commit with conventional messages:
feat(plugin): ...,fix(cli): ... - Open a PR against
main
Commit Scopes
Section titled “Commit Scopes”Use one of the following scopes in your commit messages:
| Scope | Area |
|---|---|
plugin |
crates/tauri-plugin-pilot |
cli |
crates/tauri-pilot-cli |
bridge |
crates/tauri-plugin-pilot/js/bridge.js |
protocol |
JSON-RPC protocol definitions |
workspace |
Root Cargo.toml, workspace config |
docs |
Documentation |
ci |
GitHub Actions workflows |
Reporting Issues
Section titled “Reporting Issues”Use the issue templates on GitHub — bug reports and feature requests are welcome.
License
Section titled “License”MIT
