The 2026-05-12 engine-slop pass removed runtime std::env::set_var mutation from src-tauri/src/lib.rs and replaced it with warn_if_x11_env_unset_on_wayland. With no launcher owning the contract, Linux Wayland dogfood was about to regress. run.sh: - now owns Linux launcher env defaults via case "$(uname -s)" LIBCLANG_PATH=/usr/lib64/llvm21/lib64 (user-set wins) WEBKIT_DISABLE_DMABUF_RENDERER=1 (always on Linux; user-set wins) GDK_BACKEND=x11, WINIT_UNIX_BACKEND=x11 (Wayland only; user-set wins) - 60s Vite readiness timeout - detects early Vite exit (kill -0 + wait) instead of hanging forever - trap installed before wait so Ctrl-C cleans up - args forwarded: ./run.sh --release etc. - non-exec final Tauri launch preserved so cleanup trap fires package.json: - "dev:tauri": "./run.sh" — canonical discoverable dev command Docs: - README, dev-setup, architecture-map runtime + launcher pages updated with the new contract; canonical command is npm run dev:tauri (./run.sh as direct equivalent) - dev-launcher-and-scripts.md replaces the incorrect "kills process group" claim with honest "kills the spawned npm process" - dev-setup.md path /CORBEL-Projects/magnotia → /CORBEL-Projects/transcription-app - gpu-tuning/plan.md gets a superseded note rather than rewriting the original rationale - engine-slop-residuals.md gains Area F (packaged-binary launcher contract) with honest wrapper-vs-.desktop trade-off documented Verification: bash -n run.sh; shellcheck clean; cargo check -p magnotia green; npm pkg get 'scripts.dev:tauri' returns "./run.sh"; stale-ref sweep clean across living docs.
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 map → Core, 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 --workspacefrom 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/→magnotia-corecrates/storage/→magnotia-storagecrates/hotkey/→magnotia-hotkeycrates/audio/→ audio capture (slice 3)crates/transcription/→ transcription engines (slice 3)crates/llm/→magnotia-llm(slice 4)crates/ai-formatting/→magnotia-ai-formatting(slice 4)crates/mcp/→magnotia-mcp(slice 4)crates/cloud-providers/→magnotia-cloud-providers(slice 4)src-tauri/→ the Tauri binarymagnotia(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_unwindmachinery, faster cold start. - Minus: any panic is fatal. The crash hook (slice 2) writes a
.crashfile 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.8inmagnotia-storageandsysinfo 0.35inmagnotia-corecould 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 = 1makes release builds slow. ~10 minutes on Jake's Monolith for a cleancargo tauri build. Acceptable for release; usecargo tauri dev(debug, default) for iteration.- No
[profile.dev]overrides. Default debug build.cargo buildproduces a binary intarget/debug/. The workspace target dir is./targetat the repo root, notsrc-tauri/target— this caught the CI cache step (seeci-pipeline.md).
See also
- CI pipeline — uses this profile for release builds.
- Dev launcher and scripts —
npm run dev:tauriuses the default debug profile via the canonicalrun.shlauncher. - Storage Cargo configuration — the per-crate sqlx feature stripping.