-
Notifications
You must be signed in to change notification settings - Fork 0
systems tauri command shell
Douwe de Vries edited this page Jul 1, 2026
·
1 revision
Active contributors: Douwe de Vries
The Tauri command shell is the desktop boundary between the React renderer and the Rust core. It registers command names, owns managed desktop state, grants file access, offloads blocking work, and adapts Local AI providers for core service calls.
| Path | Role |
|---|---|
src-tauri/src/main.rs |
Creates the Tauri builder, managed state, dialog plugin, and generated invoke handler. |
src-tauri/src/tauri_command_list.rs |
Single macro list of command names registered with Tauri. |
src-tauri/src/commands.rs |
Module facade that re-exports command handlers. |
src-tauri/src/commands/csv.rs |
CSV, paste, quick, preview, and preflight command handlers. |
src-tauri/src/commands/shared.rs |
Shared authorization, dialogs, spawn_blocking, service factory, and output suffix helpers. |
frontend/src/tauri.ts |
Renderer-side invoke wrappers and browser/test fallbacks. |
-
tauri_command_list!is the source of truth for command names exposed to the renderer. -
tauri::Builder::manageregistersAnonymizeJobStore,LocalAiDownloadStore,PathAccess, andSettingsStore. - Command modules convert frontend request DTOs into core params, then return serializable response DTOs.
-
run_blockingmoves CPU or file-system work off the async command handler thread. -
authorize_or_confirm_input_fileandauthorize_or_confirm_output_filebridge manual paths with Tauri dialog confirmation. -
frontend/src/tauri.tskeeps command names and argument casing aligned with Rust#[serde(rename_all = "camelCase")]request structs.
sequenceDiagram
participant UI as React hooks
participant Wrap as frontend/src/tauri.ts
participant Tauri as Tauri invoke handler
participant Cmd as command handler
participant Access as PathAccess
participant Core as AnonymizerService
UI->>Wrap: analyzeCsv(filePath, sampleRowCount, suffix)
Wrap->>Tauri: invoke("analyze_csv", args)
Tauri->>Cmd: analyze_csv()
Cmd->>Access: authorize or confirm input
Cmd->>Core: analyze_csv_sampled()
Core-->>Cmd: HeadersData
Cmd->>Access: grant output suggestion
Cmd-->>Wrap: AnalyzeResponse
Wrap-->>UI: typed Promise result
src-tauri/src/main.rs includes tauri_command_list.rs and passes the list into tauri::generate_handler! through a small macro adapter. CSV commands call AnonymizerService, direct-input commands call csv_anonymizer_core::direct_input, job commands use Background jobs, and Local AI commands create providers from src-tauri/src/local_ai.
-
Frontend workflow state calls the shell through
frontend/src/tauri.ts. -
Settings and path access provides
PathAccessandSettingsStoremanaged state. - Background jobs handles long-running anonymization and model-download commands.
-
csv-anonymizer-core provides
AnonymizerService, direct-input functions, DTOs, andSmartReplacementProvider. -
Smart replacement map is populated through
src-tauri/src/local_ai/provider.rswhen selected controls uselocalAi.
- Add or remove command registrations in
src-tauri/src/tauri_command_list.rs. - Add command modules or exports in
src-tauri/src/commands.rs. - Change CSV, paste, quick, preview, or preflight behavior in
src-tauri/src/commands/csv.rs. - Change command-side file authorization helpers in
src-tauri/src/commands/shared.rs. - Update renderer wrappers and browser/test fallbacks in
frontend/src/tauri.ts.
src-tauri/src/main.rssrc-tauri/src/tauri_command_list.rssrc-tauri/src/commands.rssrc-tauri/src/commands/csv.rssrc-tauri/src/commands/shared.rsfrontend/src/tauri.ts