Thanks for considering a contribution! Inspector Rust is a small, opinionated app — we'd rather merge a tight fix than a sprawling refactor.
git clone https://github.com/pepperonas/inspector-rust.git
cd inspector-rust
pnpm install # workspace install (Cargo + pnpm)Run the app in dev mode:
pnpm dev:macos # macOS host
pnpm dev:win # Windows host
pnpm dev:linux # Linux host (Ubuntu/Debian)For platform-specific build prerequisites see win/README.md, macos/README.md, and linux/README.md.
core/frontend/— React 19 + TS + Tailwind v4. Shared across all platforms.core/rust-lib/— Shared Rust app logic (clipboard watcher, hotkey, paste, db, snippets, tray). All cross-platform.win/src-tauri/andmacos/src-tauri/— Thin per-OS bundle shells. They owntauri.conf.json, icons, capabilities, and a 5-linemain.rsthat callsinspector_rust_core::run(generate_context!()).
When adding a feature, prefer adding it to core/. Per-OS bundles are only for things that genuinely differ (entitlements, installer config, icons).
- Branch off
main. Branch naming is informal —fix/foo,feat/bar,docs/bazall fine. - Make focused commits. One logical change per commit;
fix:,feat:,docs:,chore:,refactor:prefixes preferred (Conventional Commits). - Run the local check bundle before pushing:
bash scripts/check.sh # cargo clippy + tsc + eslint cargo test --workspace # 216 Rust tests pnpm test # 162 frontend tests
- Open a PR against
main. CI will re-run all of the above.
cargo fmt(default settings) — enforced by clippy.- No
unwrap()/expect()outside of test code unless the failure is genuinely impossible. Useanyhow::Result+?and let errors bubble up. - Structured logging via
tracing(tracing::warn!,tracing::debug!, etc.) — neverprintln!. - Never panic in IPC commands. Return
Result<T, String>and convert errors with.map_err(map_err)(seecommands.rs).
pnpm formatruns Prettier;pnpm lintruns ESLint (incl.react-hooks/recommended).strict: trueintsconfig.json— noany, no implicit any.- Prefer named exports. Default exports only for React components used by the entrypoint.
- Tailwind utility-first; CSS variables for theming (see
core/frontend/src/styles.cssand the@themeblock).
- Rust unit tests live alongside the module they cover (
#[cfg(test)] mod tests). UseConnection::open_in_memory()so tests don't touch real SQLite files. - Frontend tests use vitest + happy-dom + @testing-library/react. One
*.test.ts(x)file per source file when worth testing.
- Add the function to
core/rust-lib/src/commands.rswith#[tauri::command]. - Register it in the
invoke_handler!macro incore/rust-lib/src/lib.rs. - Add a typed wrapper in
core/frontend/src/lib/ipc.ts. - Add a unit test for the Rust function (in-memory DB) and, if it's user-facing, mention it in
README.md.
- Create
linux/(or whatever) at the repo root, mirroring the structure ofwin/andmacos/. - Add
linux/src-tauri/Cargo.toml(bin crate that depends oninspector-rust-corevia path). - Add
linux/src-tauri/src/main.rs(5-line entrypoint). - Add
linux/src-tauri/tauri.conf.jsonwithfrontendDist: "../../core/frontend/dist". - Add
linux/package.jsonwith the Tauri CLI as devDep +dev/buildproxy scripts. - Add to both workspace files:
Cargo.toml(members = [..., "linux/src-tauri"]) andpnpm-workspace.yaml(packages: [..., "linux"]). - Add
dev:linuxandbuild:linuxscripts to the rootpackage.json. - Add a job to
release.ymlthat builds and uploads the Linux artifacts. - Write
linux/README.md.
See docs/RELEASING.md for the full release procedure.
Open an issue at https://github.com/pepperonas/inspector-rust/issues. Please include:
- Inspector Rust version (tray menu → "About" — TODO, for now check
~/Library/Application Support/InspectorRust/mod times or the running binary path). - OS + version (e.g. macOS 14.5, Windows 11 23H2).
- Steps to reproduce.
- Whether the popup hotkey opens the popup at all (rules out half the codebase).
Be kind, be constructive. We don't have a formal CoC; the Contributor Covenant 2.1 is a good default.