Conversation
This reverts commit 081784b.
IntegrationTests are unintentionally disabled since 0a38d70 because reactor mode doesn't export `_start` and `WASI.start` doesn't do anything except setting the instance to WASI module. So export `main` manually, and call `_initialize` according to the "new-style commands" described in https://github.com/WebAssembly/WASI/blob/59cbe140561db52fc505555e859de884e0ee7f00/legacy/application-abi.md#current-unstable-abi Symbol support (081784b) broke tests silently, so revert it for now.
Member
Author
|
CC: @j-f1 |
|
Time Change: +9,543ms (95%) 🆘 Total Time: 9,962ms
ℹ️ View Unchanged
|
226467c to
d7ed468
Compare
j-f1
reviewed
Apr 7, 2022
| // Start the WebAssembly WASI instance! | ||
| wasi.start(instance); | ||
| instance.exports._initialize(); | ||
| instance.exports.main(); |
Member
There was a problem hiding this comment.
Why isn’t this called by e.g. wasi.start? Is there a way to make sure existing users will make this change when upgrading?
Member
Author
There was a problem hiding this comment.
That's because @wasmer/wasi doesn't support reactor. But even though WASI implementation supports it, users need to call WASI.initialize instead: https://nodejs.org/api/wasi.html#wasiinitializeinstance.
These kinds are mutually exclusive;
And they (command and reactor) are exclusive, so there is no way to upgrade without changing entrypoints
j-f1
approved these changes
Apr 7, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Export
mainand execute_initializeandmainin test entryIntegrationTests are unintentionally disabled since
0a38d70 because reactor mode doesn't
export
_startandWASI.startdoesn't do anything except setting theinstance to WASI module. So export
mainmanually, and call_initializeaccording to the "new-style commands" described inhttps://github.com/WebAssembly/WASI/blob/59cbe140561db52fc505555e859de884e0ee7f00/legacy/application-abi.md#current-unstable-abi
Symbol support (081784b) broke tests silently, so revert it for now.