Disconnects Store state fields from Compiler (#1761)
* Moves CodeMemory, VMInterrupts and SignatureRegistry from Compiler * CompiledModule holds CodeMemory and GdbJitImageRegistration * Store keeps track of its JIT code * Makes "jit_int.rs" stuff Send+Sync * Adds the threads example.
This commit is contained in:
@@ -14,8 +14,8 @@ fn main() -> Result<()> {
|
||||
let interrupt_handle = store.interrupt_handle()?;
|
||||
|
||||
// Compile and instantiate a small example with an infinite loop.
|
||||
let module = Module::from_file(&store, "examples/interrupt.wat")?;
|
||||
let instance = Instance::new(&module, &[])?;
|
||||
let module = Module::from_file(&engine, "examples/interrupt.wat")?;
|
||||
let instance = Instance::new(&store, &module, &[])?;
|
||||
let run = instance
|
||||
.get_func("run")
|
||||
.ok_or(anyhow::format_err!("failed to find `run` function export"))?
|
||||
|
||||
Reference in New Issue
Block a user