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>
5.2 KiB
name, type, slice, last_verified
| name | type | slice | last_verified |
|---|---|---|---|
| LLM Cargo features | architecture-map-page | 04-llm-formatting-mcp | 2026/05/09 |
LLM Cargo features
Where you are: Architecture map → LLM, Formatting, MCP → Cargo features
Plain English summary. Two independent build-time switches gate llama-cpp-2's GPU and threading acceleration: gpu-vulkan and openmp. Both ship enabled by default. A mobile or CPU-only build can drop one or both with --no-default-features. The features are independent so an Android Vulkan build can opt into Vulkan without OpenMP, where the NDK toolchain configuration is fragile.
At a glance
- Crate:
lumotia-llm - Path:
crates/llm/Cargo.toml:7-16 - LOC: relevant section is 10 lines
- Public surface: build-time only — no runtime API change.
- External deps that matter:
llama-cpp-2 = { version = "0.1.144", default-features = false }. Lumotia's features are forwarders. - Tauri command that calls this (slice 2, best guess): n/a — features are picked at build time. The Tauri build (
src-tauri/Cargo.toml) inherits whatever set was active when the workspace built.
What's in here
Feature definitions (crates/llm/Cargo.toml:7)
[features]
# Default desktop build keeps the existing openmp + vulkan acceleration.
# Mobile / CPU-only targets can drop one or both via:
# cargo build -p lumotia-llm --no-default-features
# These are independent so an Android Vulkan build can opt into vulkan
# without openmp (the NDK ships OpenMP libs but the toolchain configuration
# is fragile across NDK versions).
default = ["gpu-vulkan", "openmp"]
gpu-vulkan = ["llama-cpp-2/vulkan"]
openmp = ["llama-cpp-2/openmp"]
Default profile
The default profile is the desktop developer build:
gpu-vulkan→ Vulkan backend in llama.cpp. Works across Linux, Windows, and macOS (via MoltenVK) with a single binary; no per-vendor SDK at build time. The runtime requires Vulkan 1.1+ and a compatible driver.openmp→ OpenMP-parallel CPU paths in llama.cpp. Effective on big-core CPU inference; on a fully-GPU-offloaded run the gain is small but non-zero (KV cache management runs on CPU).
Mobile / CPU-only toolchain combinations
cargo build -p lumotia-llm --no-default-features— neither feature. CPU-only single-threaded llama.cpp. Useful for environments where neither Vulkan nor OpenMP is workable. Not used by any current target.cargo build -p lumotia-llm --no-default-features --features gpu-vulkan— Vulkan without OpenMP. The intended Android target per the comment block. The NDK ships OpenMP runtime libs, butcargobuilds can struggle to find them across NDK versions, so this combination keeps the GPU acceleration without the toolchain risk.cargo build -p lumotia-llm --no-default-features --features openmp— OpenMP without Vulkan. CPU-only on a multi-core machine where Vulkan is either unavailable (server with no GPU) or undesirable (Steam Deck running in a sandbox).
How features cross to llama-cpp-2
Each Lumotia feature directly toggles a llama-cpp-2 feature:
gpu-vulkan→llama-cpp-2/vulkan. The crate's Vulkan feature pulls invulkan-headersand configures the C++LLAMA_VULKANbuild flag.openmp→llama-cpp-2/openmp. The crate's OpenMP feature configures the C++LLAMA_OPENMPbuild flag and links against the system OpenMP runtime.
llama-cpp-2 = { version = "0.1.144", default-features = false } is the import line: we explicitly disable the upstream defaults and re-enable only what we declare here. That keeps the surface area small and the build deterministic.
Watch-outs
use_gpuis orthogonal togpu-vulkan. A binary built withoutgpu-vulkanstill acceptsuse_gpu: trueat runtime (inLlmEngine::load_model); llama.cpp will warn that no GPU backend was compiled in and fall back to CPU. The Tauri layer should hide the GPU toggle when the feature is off, but the engine does not enforce.- Feature drift across the workspace. The Tauri binary at
src-tauri/Cargo.tomldepends onlumotia-llmand inherits its features unless overridden. If a CI matrix builds--no-default-featuresforlumotia-llmalone, the Tauri build will still pull defaults. Verify viacargo tree -e features -p lumotia-llmwhen changing. - Build-time only. None of these are runtime-toggleable. A user cannot disable Vulkan after the fact; they need a different binary. We do not currently ship two binaries — only the desktop default.
MAX_CONTEXT_TOKENSand threading code paths are independent of features. The sameLlmEngine::generateruns whether OpenMP is in or not;inference_thread_count(Workload::Llm, gpu_offloaded)decides thread count from physical cores, not from compile-time information.- Vulkan headroom. Vulkan on macOS requires MoltenVK at runtime. The build does not ship MoltenVK. A macOS
lumotia-llmbuild withgpu-vulkanworks on a Mac that has the Vulkan SDK or MoltenVK installed; without it, llama.cpp will fail to initialise the backend and fall back to CPU.
See also
- LLM engine — runtime side of the GPU and threading story
- LLM model manager — tier sizing accounts for VRAM at recommendation time
- Slice README