mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
wasm_interp: Handle calls to imports
This commit is contained in:
parent
b10ac827f1
commit
c866ce6b09
6 changed files with 103 additions and 34 deletions
|
@ -6,7 +6,7 @@ use std::fs;
|
|||
use std::io;
|
||||
use std::process;
|
||||
|
||||
use roc_wasm_interp::Instance;
|
||||
use roc_wasm_interp::{Instance, DEFAULT_IMPORTS};
|
||||
use roc_wasm_module::WasmModule;
|
||||
|
||||
pub const FLAG_FUNCTION: &str = "function";
|
||||
|
@ -88,10 +88,11 @@ fn main() -> io::Result<()> {
|
|||
|
||||
// Create an execution instance
|
||||
|
||||
let mut inst = Instance::for_module(&arena, &module, is_debug_mode).unwrap_or_else(|e| {
|
||||
eprintln!("{}", e);
|
||||
process::exit(2);
|
||||
});
|
||||
let mut inst = Instance::for_module(&arena, &module, DEFAULT_IMPORTS, is_debug_mode)
|
||||
.unwrap_or_else(|e| {
|
||||
eprintln!("{}", e);
|
||||
process::exit(2);
|
||||
});
|
||||
|
||||
// Run
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue