mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
test_gen: update wasm linking tests to work withx wasm3 runtime
This commit is contained in:
parent
6da71008cb
commit
0b0c54d676
3 changed files with 38 additions and 65 deletions
|
@ -185,9 +185,10 @@ where
|
|||
.create_runtime(1024 * 60)
|
||||
.expect("Unable to create runtime");
|
||||
|
||||
let module = Module::parse(&env, &wasm_bytes[..]).expect("Unable to parse module");
|
||||
|
||||
let mut module = rt.load_module(module).expect("Unable to load module");
|
||||
let parsed_module = Module::parse(&env, &wasm_bytes[..]).expect("Unable to parse module");
|
||||
let mut module = rt
|
||||
.load_module(parsed_module)
|
||||
.expect("Unable to load module");
|
||||
|
||||
let panic_msg: Rc<Mutex<Option<(i32, i32)>>> = Default::default();
|
||||
let panic_msg_for_closure = panic_msg.clone();
|
||||
|
|
|
@ -27,9 +27,11 @@ export fn host_unused() i32 {
|
|||
return 0x400 | js_unused() | js_called_directly_from_roc();
|
||||
}
|
||||
|
||||
var host_result: i32 = 0;
|
||||
|
||||
// Result is an extern global so the test can read it from the Wasm module
|
||||
extern var host_result: i32;
|
||||
export fn read_host_result() i32 {
|
||||
return host_result;
|
||||
}
|
||||
|
||||
pub fn main() !void {
|
||||
const host = host_called_directly_from_main();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue