pub fn compile(path: &str, source: &str, wanted: &[&str]) -> Result<HookScript>Expand description
Compile a stage-hook script and record which hooks it defines.
wanted is what the blueprint asked this file for. A file that does not
define a hook it was named for is a compile error: the blueprint asked for
behaviour that would otherwise never run, and a hook that never runs looks
exactly like one that ran and allowed everything.
Every hook takes exactly one parameter (ctx); a different arity is
rejected here rather than failing at the first call, mid-run.