add 'ProtectedCaller' to runtime

This commit is contained in:
Lachlan Sneff
2019-01-18 12:13:01 -08:00
parent ed87168c48
commit 705708cafe
6 changed files with 183 additions and 81 deletions

View File

@ -32,7 +32,8 @@ use std::rc::Rc;
/// Compile a webassembly module using the provided compiler.
pub fn compile(wasm: &[u8], compiler: &dyn backend::Compiler) -> CompileResult<module::Module> {
let token = backend::Token::generate();
compiler
.compile(wasm)
.compile(wasm, token)
.map(|inner| module::Module::new(Rc::new(inner)))
}