Skip to main content

Module compiler_plugins

Module compiler_plugins 

Source
Expand description

Injected compiler-plugin boundary.

Compiler plugins are loaded and driven by the compiler (lumenc), but the compile pipeline they hook into (load_ir, compile_app, hot reload) lives in the runtime crate, which links no plugin loader for the same reason it links no parser (see crate::source_parser): the dependency would run the wrong way. The chain is injected instead:

  • The CLI, the Rust SDK, and the C-ABI dev paths hand a CompilerPlugins to RunOptions, built by lumenc from the app’s [[plugins]] declarations.
  • The dev source-load path and hot reload call it.
  • The precompiled-artifact path already carries the transformed tree and ignores this hook.

Errors are Strings that already name the failing plugin; a hook error fails the compile with it.

Structs§

NoCompilerPlugins
The empty chain: every hook is a no-op. What every path without a [[plugins]] declaration runs.
RuntimeCompilerPlugins
The injected chain, stashed as a resource beside crate::source_parser::RuntimeParser so a hot reload reruns the same hooks without reloading the plugin libraries.

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.