Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for 'exports-memory' does not seem to work? #3036

Closed
kmott opened this issue Jul 22, 2022 · 2 comments
Closed

Example for 'exports-memory' does not seem to work? #3036

kmott opened this issue Jul 22, 2022 · 2 comments
Labels
❓ question I've a question!

Comments

@kmott
Copy link

kmott commented Jul 22, 2022

Summary

Hello, I am working through the examples, and I noticed exports-memory does not seem to work if I create it as a standalone project.

  |
1 | use wasmer::{imports, wat2wasm, Instance, Module, Store, TypedFunction, WasmPtr};
  |                                                          ^^^^^^^^^^^^^ no `TypedFunction` in the root

If I check out the main wasmer repo and run the example with cargo run --example exported-memory --release --features "cranelift" it works just fine.

I wonder if when the NativeFunc -> TypedFunction rename occurred, the examples got updated as well, but the 2.3.0 version of wasmer does not support the new TypedFunction yet (I think this may occur with a few other examples as well)?

Repro & Logs

@kmott kmott added the ❓ question I've a question! label Jul 22, 2022
@jcaesar
Copy link
Contributor

jcaesar commented Jul 24, 2022

I wonder if when the NativeFunc -> TypedFunction #2939 occurred, the examples got updated as well, but the 2.3.0 version of wasmer does not support the new TypedFunction yet (I think this may occur with a few other examples as well)?

Looking at the list of changed files, I'd say breaking changes happened in nearly all the examples.

But is this a problem? Couldn't you just grab the example for wasmer 2.3.0?
https://github.com/wasmerio/wasmer/blob/2.3.0/examples/exports_memory.rs

@syrusakbary
Copy link
Member

Thanks for repoting the issue. The current examples have changed from the 2.3.0 API so that's why you are encountering the issue.

If you use the file from the 2.3.0 tag things should work properly. Sorry for the confussion, as soon as we release the Wasmer 3.0 beta it should be solved.

Closing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ question I've a question!
Projects
None yet
Development

No branches or pull requests

3 participants