wasm_interp: Create a CLI to run .wasm files

This commit is contained in:
Brian Carroll 2022-11-24 19:26:52 +00:00
parent 6d84c85078
commit 60a671362f
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
5 changed files with 107 additions and 16 deletions

View file

@ -56,7 +56,8 @@ impl Env<'_> {
/// Parse the preprocessed host binary
/// If successful, the module can be passed to build_app_binary
pub fn parse_host<'a>(arena: &'a Bump, host_bytes: &[u8]) -> Result<WasmModule<'a>, ParseError> {
WasmModule::preload(arena, host_bytes)
let require_relocatable = true;
WasmModule::preload(arena, host_bytes, require_relocatable)
}
/// Generate a Wasm module in binary form, ready to write to a file. Entry point from roc_build.