-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Reenable integration tests #180
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.
CC: @j-f1 |
Time Change: +9,543ms (95%) 🆘 Total Time: 9,962ms
ℹ️ View Unchanged
|
226467c
to
d7ed468
Compare
@@ -45,6 +45,8 @@ const startWasiTask = async (wasmPath) => { | |||
swift.setInstance(instance); | |||
// Start the WebAssembly WASI instance! | |||
wasi.start(instance); | |||
instance.exports._initialize(); | |||
instance.exports.main(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Export
main
and execute_initialize
andmain
in test entryIntegrationTests are unintentionally disabled since
0a38d70 because reactor mode doesn't
export
_start
andWASI.start
doesn't do anything except setting theinstance to WASI module. So export
main
manually, and call_initialize
according 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.