alexcrichton commented on Issue #967:
I believe this has since been fixed, so closing
alexcrichton closed Issue #967:
When compiling trying to run the example https://github.com/bytecodealliance/wasmtime/blob/master/docs/embed-rust.md it fails with the attached error message. It seems the API has changed since the documentation was written. I am using 0.11.0. Can anyone verify this?
```$ cargo run
Compiling wasmtime_hello v0.1.0 (/Users/gustaveiman/rust_projects/wasmtime_hello)
error[E0061]: this function takes 2 parameters but 3 parameters were supplied
--> src/main.rs:10:20
|
10 | let instance = Instance::new(&store, &module, &[]).expect("wasm instance");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 2 parameterserror[E0599]: no method named
find_export_by_name
found for typewasmtime::instance::Instance
in the current scope
--> src/main.rs:12:27
|
12 | let answer = instance.find_export_by_name("answer").expect("answer").func().expect("function");
| ^^^^^^^^^^^^^^^^^^^ method not found inwasmtime::instance::Instance
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0061, E0599.
For more information about an error, tryrustc --explain E0061
.
error: could not compilewasmtime_hello
.To learn more, run the command again with --verbose.```
Last updated: Nov 22 2024 at 16:03 UTC