Files
Lumotia/docs/architecture-map/05-core-storage-hotkey-build/workspace-cargo.md
Jake 26c7307607
Some checks failed
check / cargo check (macos-latest) (push) Has been cancelled
check / cargo check (ubuntu-22.04) (push) Has been cancelled
check / cargo check (windows-latest) (push) Has been cancelled
check / svelte build + lint (push) Has been cancelled
agent: lumotia-rebrand — docs, scripts, root config, residuals
Phase 9 of the rebrand cascade. Sweep covers everything the Phase 8
frontend pass deliberately skipped: docs/, root markdown, scripts,
Cargo.toml descriptions, code comments that survived earlier
word-boundary sed, plus a handful of identifiers caught on the final
verify pass.

transcription-app changes:
- README.md, HANDOVER.md, KNOWN-ISSUES.md, run.sh — magnotia/Magnotia
  -> lumotia/Lumotia.
- docs/ — sweep across all subdirs except docs/handovers/ (preserved
  as immutable audit trail). Includes architecture-map references
  to magnotia_core::*, magnotia_storage::*, etc. now pointing at
  lumotia_*; dev-setup.md tracing output examples (lumotia_startup
  target); brief/ + superpowers/ + issues/ + whisper-ecosystem/ +
  audit/.
- Cargo.toml descriptions on 9 crates (core, audio, cloud-providers,
  hotkey, llm, mcp, plus referenced others).
- crates/core/src/{error,hardware,recommendation,paths}.rs +
  crates/audio/src/wav.rs + crates/llm/src/model_manager.rs +
  crates/cloud-providers/src/keystore.rs + crates/mcp/src/lib.rs —
  doc comments and a model-manager user-agent string.
- Caught on final pass: BroadcastChannel("magnotia_task_sync") -> ...
  ("lumotia_task_sync"); magnotia_locale i18n localStorage key
  renamed + migration shim added; CSS keyframe names
  magnotiaPulse / magnotiaBar / magnotiaFade renamed in the design-
  system kit; magnotia_viewer_item / magnotia_viewer_mode handoff
  keys renamed in HistoryPage + viewer/+page.svelte; src/assets/
  wordmark.svg text.
- src-tauri/src/lib.rs comment cleanup ("magnotia era" was sed'd
  to "lumotia era" earlier — restored).

Preserved (intentional):
- crates/core/src/paths.rs — keeps "magnotia" / "Magnotia" / ".magnotia"
  legacy detection strings in legacy_and_target_paths() so the
  migration shim can still find user data from the magnotia era.
- src/lib/stores/{page,focusTimer}.svelte.ts + src/lib/i18n/index.ts
  — migration call sites reference the legacy magnotia keys
  deliberately.
- docs/handovers/ — historical audit trail.

cargo build --workspace passes. npm run check: 0 errors / 0 warnings
(3958 files). cargo test --workspace: 339 pass / 0 fail.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 12:38:03 +01:00

4.0 KiB

name, type, slice, last_verified
name type slice last_verified
Workspace Cargo.toml architecture-map-page 05-core-storage-hotkey-build 2026/05/09

Workspace Cargo.toml

Where you are: Architecture mapCore, Storage, Hotkey, Build → Workspace Cargo.toml

Plain English summary. The repo-root Cargo.toml. Tiny — 161 bytes. Defines the Cargo workspace (one binary at src-tauri/, every crate under crates/*) and the release profile that produces the Tauri bundle artefacts.

At a glance

  • File: /Cargo.toml (repo root, 161 bytes).
  • External: none. The workspace root has no dependencies of its own; member crates pin their own versions.
  • Consumers: every Cargo invocation. cargo check --workspace from the repo root walks the members.

Contents

[workspace]
members = ["src-tauri", "crates/*"]
resolver = "2"

[profile.release]
codegen-units = 1
lto = "thin"
opt-level = 3
panic = "abort"
strip = "symbols"

Members

The crates/* glob picks up every directory under crates/ that contains a Cargo.toml. Members at the time of writing:

  • crates/core/lumotia-core
  • crates/storage/lumotia-storage
  • crates/hotkey/lumotia-hotkey
  • crates/audio/ → audio capture (slice 3)
  • crates/transcription/ → transcription engines (slice 3)
  • crates/llm/lumotia-llm (slice 4)
  • crates/ai-formatting/lumotia-ai-formatting (slice 4)
  • crates/mcp/lumotia-mcp (slice 4)
  • crates/cloud-providers/lumotia-cloud-providers (slice 4)
  • src-tauri/ → the Tauri binary lumotia (slice 2)

Resolver

resolver = "2" is mandatory for any workspace that mixes feature flags across [dependencies] and [build-dependencies] or [dev-dependencies]. Without it, features unify in surprising ways (a build-script-only feature can silently affect the runtime crate). Tauri 2's docs require resolver 2.

Release profile

codegen-units = 1   # one codegen unit; longer compile, better optimisation
lto = "thin"         # cross-crate inlining without full LTO's compile blow-up
opt-level = 3        # standard optimised
panic = "abort"      # smaller binaries; no unwind tables; mandatory for embedded panics
strip = "symbols"    # debug symbols stripped from release artefacts

The panic = "abort" setting is a deliberate trade-off:

  • Plus: smaller binary, no __rust_panic_unwind machinery, faster cold start.
  • Minus: any panic is fatal. The crash hook (slice 2) writes a .crash file before the process dies; the diagnostic-report bundler in Settings → About surfaces it on next launch.

lto = "thin" not "fat" because thin LTO gives most of the optimisation benefit at a fraction of the compile time. Whisper-rs-sys + llama-cpp-sys-2 are already huge C++ builds; saving build time matters more than the last 5% of optimisation.

Watch-outs

  • No [workspace.dependencies] block. Each member crate pins its own dep versions independently. Side effect: sqlx 0.8 in lumotia-storage and sysinfo 0.35 in lumotia-core could drift between members. A future tidy would centralise common pins.
  • No [patch] overrides. Useful to know — every crate is consumed at its registered version.
  • codegen-units = 1 makes release builds slow. ~10 minutes on Jake's Monolith for a clean cargo tauri build. Acceptable for release; use cargo tauri dev (debug, default) for iteration.
  • No [profile.dev] overrides. Default debug build. cargo build produces a binary in target/debug/. The workspace target dir is ./target at the repo root, not src-tauri/target — this caught the CI cache step (see ci-pipeline.md).

See also