EngineConfig and Engine::with_config; the desktop resolves Tauri's app config and data dirs. Settings model (appearance.theme, editor.fontSize, ui.language) with typed validation, persistence in settings.json via write_atomic (1 MiB cap, unknown keys kept, corrupt file backed up with a warning notification), settings.list/get/set/reset, settingsChanged and notification events. Property test over random settings.json content, control-channel test for persistence and corrupt-file recovery. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
799 B
Rust
27 lines
799 B
Rust
//! Engine of Lutra (layer L4).
|
|
//!
|
|
//! Owns the command registry, the workspace state, the panic guard around every
|
|
//! entry point and the crash-recovery journal. Every user-visible action is a
|
|
//! [`Command`]; menus, the palette, shortcuts, the CLI, the control channel and
|
|
//! MCP all reach it through [`Engine::execute`].
|
|
|
|
mod buffers;
|
|
pub mod cmd;
|
|
mod command;
|
|
mod engine;
|
|
mod error;
|
|
mod event;
|
|
pub mod guard;
|
|
mod registry;
|
|
pub mod settings;
|
|
mod state;
|
|
pub mod theme;
|
|
pub mod workspace;
|
|
|
|
pub use buffers::{BufferId, LineEndingName, OpenBuffer};
|
|
pub use command::{Command, CommandInfo, CommandSpec, Effect, Outcome};
|
|
pub use engine::{Engine, EngineConfig};
|
|
pub use error::{EngineError, ErrorPayload};
|
|
pub use event::{Event, NotificationLevel};
|
|
pub use registry::Registry;
|
|
pub use state::State;
|