Skip to main content

Crate lumen_runtime

Crate lumen_runtime 

Source
Expand description

lumen-runtime - the “lumen.so core”: the ECS run loop, the default plugin stack, script-command machinery, hot reload, file-based pages, and the AOT-artifact / from-source app loaders.

Carved out of lumenc so the SDKs (lumenui, the C-ABI lumen, and everything downstream) depend on the runtime without pulling the compiler front-end. The markup / CSS parser stays in lumenc; the runtime reaches it only through the injected SourceParser hook (see source_parser), so lumen-runtime links no parser and no lumenc.

The IR data model - LayoutIR, the CSS AST + Cascade-5 application, the shared value parsers, the var() resolver, and the AOT artifact container - lives in lumen-ir and is used here directly.

Re-exports§

pub use config::ConfigError;
pub use config::LumenToml;
pub use run::module_surface;
pub use run::AppHook;
pub use run::CheckReport;
pub use run::PluginInstaller;
pub use run::RunError;
pub use run::RunOptions;
pub use run::WindowSetup;
pub use run::build_headless_app;
pub use run::run_app;
pub use run::run_app_headless;
pub use run::CompileDeps;
pub use run::ModuleSurface;
pub use run::check_app;
pub use run::compile_app;
pub use run::compile_app_with_skin;
pub use run_headless::HeadlessOptions;
pub use run_headless::run_app_headless_rendered;
pub use lumen_modules as modules;

Modules§

app_kind
SDK app-kind detection + external (Rust/C++/Python) build/run dispatch. App-kind detection and build/run dispatch for SDK-authored apps.
app_layout
Where an app keeps its code: lumen.toml at the root, everything the compiler front-end reads under src/. Where an app keeps its code.
compiler_plugins
The injected compiler-plugin boundary. See compiler_plugins::CompilerPlugins. Injected compiler-plugin boundary.
config
Per-app lumen.toml configuration model. Per-app lumen.toml config loader.
fragments
The app’s compiled fragments and what an instance of one carries. Fragments at run time: the app’s declared fragment set, the marker a fragment instance carries, and the argument binding an instantiation resolves its placeholders against.
hooks
[[hooks]] runner - executes an app’s declared prebuild / prerun build/setup commands. See config::HookCfg for the schema. [[hooks]] runner: executes an app’s declared build/setup commands at the prebuild and prerun trigger points.
pages
File-based pages - multi-.lmn discovery, <if>-reconciler page mount, and the navigation resolver reachable from every embedding surface. File-based pages - multi-.lmn discovery, registration, and the runtime navigation resolver.
profile
--profile chrome|stderr|tracy profiler install (feature-gated). Opt-in profiler installation invoked from lumenc run --profile <kind>.
run
The ECS run loop, RunOptions/RunError, build_app, hot reload, and the script-command machinery. Launches a pure-markup Lumen app via lumenc run <dir>.
run_headless
Rendered offscreen headless mode (lumenc run --headless). True headless run mode: the full app pipeline - layout, real rendering through the app’s render backend and the shared Node-IR walker, the MCP server, input simulation, hot reload, and screenshots - with zero windows. No window backend runs, so the desktop / compositor is never touched. This is the automation / CI mode behind lumenc run <app> --headless.
skins
Embedded user-agent skin stylesheets. Embedded user-agent stylesheets.
source_parser
The injected markup/CSS parser boundary. See SourceParser. Injected source front-end - the markup + CSS parser boundary.
spawn
IR -> ECS spawner and the <for> / <if> reconcilers. LayoutIR::spawn_into walks the IR tree and spawns entities into the main world.
window_state
Windowed geometry persistence ([window] remember_state). Per-app window-state persistence.

Traits§

CompilerPlugins
The loaded compiler-plugin chain of one app. Implemented in lumenc over the lumenc-plugin loader; every hook runs the declared plugins in lumen.toml order.
SourceParser
The markup/CSS front-end, injected by whoever drives the runtime from source. Implemented in lumenc (LumencParser) over its roxmltree markup parser, the hand-rolled CSS parser, the <include> / @import resolver, and the real-filesystem FsLoader.