pub fn intercept_assembly(
basename: &str,
patch: impl Fn(&[u8]) -> Result<Vec<u8>> + Send + Sync + 'static,
)Expand description
Serves a rewritten copy of basename (matched by file name) whenever the
runtime opens it. patch receives the original bytes and returns the
replacement (see patch_call). Call it from a mod’s
entry point, before the runtime loads the assembly.