* 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.
14 lines
412 B
Rust
14 lines
412 B
Rust
use anyhow::Result;
|
|
use wasmtime::*;
|
|
|
|
#[test]
|
|
fn wrong_import_numbers() -> Result<()> {
|
|
let store = Store::default();
|
|
let module = Module::new(store.engine(), r#"(module (import "" "" (func)))"#)?;
|
|
|
|
assert!(Instance::new(&store, &module, &[]).is_err());
|
|
let func = Func::wrap(&store, || {});
|
|
assert!(Instance::new(&store, &module, &[func.clone().into(), func.into()]).is_err());
|
|
Ok(())
|
|
}
|