pub fn compile_app(
dir: &Path,
parser: &dyn SourceParser,
plugins: &dyn CompilerPlugins,
deps: &CompileDeps,
warnings: &mut Vec<String>,
) -> Result<CompiledApp, RunError>Expand description
Ahead-of-time compile an app directory into a
lumen_ir::artifact::CompiledApp: parse markup + CSS once, run the full
cascade, resolve asset / include / import paths, and bake the combined
script source. The returned artifact is what lumenc build writes to
disk and what a parser-free runtime loads via RunOptions::artifact.
This is the AOT counterpart to [load_ir]: same front-end work, on the
same discovered page set, but the result is serialized instead of spawned.
A multi-page app compiles whole - every page assembled into the one gated
tree the run path builds, plus the page set the routing needs. Requires the
source parser (runtime-parse feature).
What a script compiler warned about is added to warnings, one line each,
for the caller to print where it prints its own warnings.