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

Reenable integration tests #180

Merged
merged 2 commits into from
Apr 7, 2022
Merged

Reenable integration tests #180

merged 2 commits into from
Apr 7, 2022

Conversation

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Apr 6, 2022

Export main and execute _initialize and main in test entry

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.

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.
@kateinoigakukun
Copy link
Member Author

CC: @j-f1

@github-actions
Copy link

github-actions bot commented Apr 6, 2022

Time Change: +9,543ms (95%) 🆘

Total Time: 9,962ms

Test name Duration Change
Serialization/Swift Int to JavaScript 3,036.25ms +3,036.25ms (100%) 🆘
Serialization/Swift String to JavaScript 3,110.25ms +3,110.25ms (100%) 🆘
Object heap/Increment and decrement RC 3,390.5ms +3,390.5ms (100%) 🆘
ℹ️ View Unchanged
Test name Duration Change
Serialization/Write JavaScript number directly 212.5ms +6.25ms (2%)
Serialization/Write JavaScript string directly 212.5ms -0.25ms

performance-action

@kateinoigakukun kateinoigakukun force-pushed the katei/reenable-test branch 2 times, most recently from 226467c to d7ed468 Compare April 6, 2022 19:22
@MaxDesiatov MaxDesiatov requested a review from j-f1 April 6, 2022 21:07
@@ -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();
Copy link
Member

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?

Copy link
Member Author

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;

https://github.com/WebAssembly/WASI/blob/59cbe140561db52fc505555e859de884e0ee7f00/legacy/application-abi.md#current-unstable-abi

And they (command and reactor) are exclusive, so there is no way to upgrade without changing entrypoints

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants