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

Crates

Active contributors: Douwe de Vries

Purpose

This section maps the Rust workspace members defined in Cargo.toml. Use it to decide whether a change belongs in the reusable core engine, the CLI smoke harness, or the Tauri desktop shell.

Directory layout

Workspace member Page Purpose
crates/csv-anonymizer-core csv-anonymizer-core Detection, CSV IO, direct input, transformations, Smart replacement traits, and privacy reports.
crates/csv-anonymizer-app csv-anonymizer-app Lightweight CLI harness and smoke path over the shared core.
src-tauri csv-anonymizer-tauri Tauri Rust workspace member that exposes desktop commands and managed state.

Key abstractions

  • csv-anonymizer-core is the reusable library that owns the domain model and transformation behavior.
  • csv-anonymizer-app is a binary crate that calls the core for command-line analysis, anonymization, and smoke checks.
  • csv-anonymizer-tauri is the Tauri binary crate that adapts frontend commands to core calls and desktop services.
  • Workspace package metadata, including version, edition, license, authors, and repository, is centralized in Cargo.toml.
  • Shared dependency versions are centralized under [workspace.dependencies].

How it works

graph LR
    App[csv-anonymizer-app] --> Core[csv-anonymizer-core]
    Tauri[csv-anonymizer-tauri] --> Core
    Frontend[React frontend] -->|Tauri invoke| Tauri
    Core --> Types[types.rs DTOs]
    Core --> Reports[privacy reports]
Loading

The core crate is dependency-free from the app and Tauri crates. The CLI and Tauri crates depend on the core through path dependencies, so behavior shared by desktop workflows, direct-input workflows, and smoke checks should live in core first.

Integration points

  • Systems explains the runtime systems that use these crates.
  • Primitives explains shared domain objects such as Column metadata, Transform strategy, Privacy report, and Smart replacement map.
  • frontend/src/types.ts mirrors DTOs exported by crates/csv-anonymizer-core/src/types.rs.
  • package.json scripts run workspace checks through cargo check --workspace, cargo test --workspace, cargo clippy --workspace --all-targets, and cargo fmt --all --check.

Entry points for modification

Change Start here
Detection, metadata, transformation, reports, direct input, or Smart replacement traits csv-anonymizer-core
CLI command parsing or smoke harness output csv-anonymizer-app
Tauri command wiring, managed state, or desktop adapters csv-anonymizer-tauri
Add a Rust workspace member Cargo.toml

Key source files

  • Cargo.toml
  • crates/csv-anonymizer-core/Cargo.toml
  • crates/csv-anonymizer-app/Cargo.toml
  • src-tauri/Cargo.toml

Clone this wiki locally