Skip to main content

compile_template

Function compile_template 

Source
pub fn compile_template(source: &str) -> Result<Vec<u8>, TemplateError>
Expand description

Compiles source against the restricted render surface, returning the wasm bytes. A template that names a non-allowlisted native fails here with a TemplateError::Compile — this is the first half of the security gate (the compiler simply doesn’t know the dangerous natives exist).