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:
@@ -11,8 +11,8 @@ fn main() -> Result<()> {
|
||||
// `Module` which is attached to a `Store` cache. After we've got that we
|
||||
// can instantiate it.
|
||||
let store = Store::default();
|
||||
let module = Module::from_file(&store, "examples/gcd.wat")?;
|
||||
let instance = Instance::new(&module, &[])?;
|
||||
let module = Module::from_file(store.engine(), "examples/gcd.wat")?;
|
||||
let instance = Instance::new(&store, &module, &[])?;
|
||||
|
||||
// Invoke `gcd` export
|
||||
let gcd = instance
|
||||
|
||||
Reference in New Issue
Block a user