Skip to content

crates csv anonymizer tauri

Douwe de Vries edited this page Jul 1, 2026 · 1 revision

csv-anonymizer-tauri

Active contributors: Douwe de Vries

Purpose

csv-anonymizer-tauri is the Rust workspace member under src-tauri. It owns the Tauri process, command registration, managed desktop state, and Rust adapters around csv-anonymizer-core. It does not own the React UI implementation.

Directory layout

Path Role
src-tauri/Cargo.toml Tauri crate metadata, dependencies, build dependency, and custom-protocol feature.
src-tauri/src/main.rs Tauri builder, managed state registration, dialog plugin, generated invoke handler, and command-list test.
src-tauri/src/commands.rs Command module facade and public command exports.

Key abstractions

  • The crate package name is csv-anonymizer-tauri.
  • It depends on csv-anonymizer-core through a path dependency.
  • main.rs registers managed state for anonymization jobs, Local AI downloads, path access, and settings.
  • commands.rs re-exports command handlers from CSV, file, job, Local AI, settings, and shared command modules.
  • The command list is included from src-tauri/src/tauri_command_list.rs so command registration stays centralized.
  • Tauri config and bundling metadata live next to the crate but are separate from Rust crate source.

How it works

graph LR
    Main[src-tauri/src/main.rs] --> Commands[src-tauri/src/commands.rs]
    Main --> State[managed state]
    Commands --> Csv[commands/csv.rs]
    Commands --> Jobs[commands/job_commands.rs]
    Commands --> Files[commands/files.rs]
    Commands --> Settings[commands/settings_commands.rs]
    Commands --> LocalAI[commands/local_ai_commands.rs]
    Csv --> Core[csv-anonymizer-core]
    Jobs --> Core
    LocalAI --> Core
Loading

At startup, tauri::Builder installs managed state, initializes the dialog plugin, builds the invoke handler from tauri_command_list!, and runs the generated Tauri context. Command handlers then adapt frontend requests to core DTOs or desktop operations.

Integration points

Entry points for modification

  • Change crate dependencies or features in src-tauri/Cargo.toml.
  • Change top-level Tauri setup in src-tauri/src/main.rs.
  • Add command modules or exports in src-tauri/src/commands.rs.
  • Add command names to src-tauri/src/tauri_command_list.rs when exposing new handlers.
  • Keep React-specific workflow state in frontend/src, not in this crate.

Key source files

  • src-tauri/Cargo.toml
  • src-tauri/src/main.rs
  • src-tauri/src/commands.rs
  • src-tauri/src/tauri_command_list.rs

Clone this wiki locally