[−][src]Function wasmer_runtime::compile
pub fn compile(wasm: &[u8]) -> CompileResult<Module>
Compile WebAssembly binary code into a Module
.
This function is useful if it is necessary to
compile a module before it can be instantiated
(otherwise, the instantiate
function should be used).
Params:
wasm
: A&[u8]
containing the binary code of the wasm module you want to compile.
Errors:
If the operation fails, the function returns Err(error::CompileError::...)
.