-
Notifications
You must be signed in to change notification settings - Fork 0
background rust tauri rewrite
CSV Anonymizer's active architecture is a Rust core, a Tauri desktop shell, and a bundled React/Vite frontend. The historical source document is docs/rust-rewrite-plan.md.
Active contributors: Douwe de Vries
The rewrite is implemented. Production desktop packaging uses:
-
crates/csv-anonymizer-corefor detection, metadata, deterministic hashing, strategies, sample reading, preview, streaming CSV anonymization, direct-input workflows, Smart replacement validation, and reports. -
src-taurifor Tauri command registration, file dialogs, path grants, settings persistence, background jobs, output opening, and Local AI/Ollama integration. -
frontendfor the React/Vite UI bundled into Tauri. -
crates/csv-anonymizer-appas a lightweight CLI and smoke-test harness for the shared Rust core.
See Architecture for the current layer map.
The old Bun, Electrobun, Vue, and Electron-era runtime paths are no longer the active app architecture. The current CI and release workflows no longer install Bun. They build the Vite frontend once and require Tauri to consume frontend/dist through src-tauri/tauri.conf.json.
The TypeScript-only test surface that belonged to the older runtime was replaced by:
- Rust tests in
crates/csv-anonymizer-core,src-tauri, andcrates/csv-anonymizer-app. - Frontend Vitest tests under
frontend/src. - Playwright e2e and accessibility tests under
frontend/e2e. - Scripted release, contract, audit, and smoke checks under
scripts.
Tauri starts from src-tauri/src/main.rs, manages shared stores, initializes the dialog plugin, and registers commands from src-tauri/src/tauri_command_list.rs.
Frontend command wrappers live in frontend/src/tauri.ts. They call commands for settings, file selection, CSV analysis, pasted data, quick values, anonymization jobs, and Local AI status/download actions.
Blocking CSV and Local AI work is moved off the UI thread through Tauri async workers and job stores in src-tauri/src/jobs.rs, src-tauri/src/job_registry.rs, and src-tauri/src/local_ai/download.rs.
Release artifacts are written under dist/rust:
- macOS
.dmginstallers are signed, notarized, stapled, and verified in.github/workflows/release.yml. - Linux
.deb,.rpm, and AppImage artifacts are built throughscripts/package-tauri-linux.mjs. - Linux package metadata is validated through
scripts/validate_linux_package_metadata.py. - A signed APT repository is built through
scripts/build_apt_repository.pyand published through GitHub Pages.
The Tauri CLI version is pinned in CI and release workflows with TAURI_CLI_VERSION, matching the Tauri 2 line used by the Rust dependencies.
The rewrite is guarded by the same checks described in Testing:
npm run frontend:build
npm run frontend:audit
npm run frontend:lint
npm run frontend:test
npm run frontend:e2e
npm run frontend:a11y
npm run deadcode:required
npm run cargo:audit:required
npm run tauri:prebuilt:check
cargo fmt --all --check
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings
node scripts/rust-smoke.mjs
node scripts/check-release-metadata.mjsPackage checks are covered in Deployment.