//! Example of instantiating of the WebAssembly module and invoking its exported1//! function.23// You can execute this example with `cargo run --example gcd`45use wasmtime::*;67fn main() -> Result<()> {8// Load our WebAssembly (parsed WAT in our case), and then load it into a9// `Module` which is attached to a `Store` cache. After we've got that we10// can instantiate it.11let mut store = Store::<()>::default();12let module = Module::from_file(store.engine(), "examples/gcd.wat")?;13let instance = Instance::new(&mut store, &module, &[])?;1415// Invoke `gcd` export16let gcd = instance.get_typed_func::<(i32, i32), i32>(&mut store, "gcd")?;1718println!("gcd(6, 27) = {}", gcd.call(&mut store, (6, 27))?);19Ok(())20}212223