pub trait TransformPlugin: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn matches(&self, path: &str, source: &str) -> bool;
fn transform(
&self,
source: &str,
path: &str,
ctx: &TransformContext,
) -> Option<String>;
// Provided method
fn priority(&self) -> u32 { ... }
}Expand description
A plugin that hooks into the source-code transform pipeline.
Compile-time only — no WASM overhead on every file.
Built-in transforms run at priorities 100–700. Plugin transforms default to priority 1000 (after all built-ins). Lower priority runs first.