-
Notifications
You must be signed in to change notification settings - Fork 811
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
Function::new_native support for closures with captured environments #1811
Comments
Thanks for creating the issue! Wasmer currently doesn't support closures in Functions, but we have been investigating in the last days to see if we can add support for them. We'll post here our findings! |
1841: Disable closures as host functions for now + docs + tests r=syrusakbary a=MarkMcCaskey Resolves #1811 for now Part of #1840 # Review - [x] Add a short description of the the change to the CHANGELOG.md file Co-authored-by: Mark McCaskey <mark@wasmer.io> Co-authored-by: Syrus Akbary <me@syrusakbary.com>
Even though we merged the PR that panics if closures with captured environments are used for native functions, I'd like to keep this issue open until we fully support closures with captured environments in native functions |
Wasn't #1840 supposed to track that? What's the difference between the two tickets? |
Closing in favor of #1840. I had to pick one :-). |
Describe the bug
Function::new_native
seems to be playing fast and loose with closures.Cargo.toml
:For reference this (correctly) prints "42":
This (incorrectly) crashes the program with a stack overflow:
This (incorrectly) prints 0:
Additional context
Globally-installed things:
The text was updated successfully, but these errors were encountered: