Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2436: Added the 32 bit variant of x86 to generate a target machine for inkwell r=syrusakbary a=MidasLamb Extended the match on X86_64 to include the X86_32 and all of its architectures. This allows the following program to run on a 32 bit windows VM: ``` fn main() -> Result<(), Box<dyn std::error::Error>> { use wasmer::{imports, Instance, Module, Store, Value}; let module_wat = r#" (module (type $t0 (func (param i32) (result i32))) (func $add_one (export "add_one") (type $t0) (param $p0 i32) (result i32) get_local $p0 i32.const 1 i32.add)) "#; let store = Store::default(); let module = Module::new(&store, &module_wat)?; // The module doesn't import anything, so we create an empty import object. let import_object = imports! {}; let instance = Instance::new(&module, &import_object)?; let add_one = instance.exports.get_function("add_one")?; let result = add_one.call(&[Value::I32(42)])?; assert_eq!(result[0], Value::I32(43)); dbg!(&result[0]); Ok(()) } ``` Co-authored-by: Midas Lambrichts <[email protected]>
- Loading branch information