-
Notifications
You must be signed in to change notification settings - Fork 824
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
Lack of _start export causes exception #362
Comments
Good catch! Thanks for reporting the issue |
Related issue in lucet: bytecodealliance/lucet#129 (comment) Based on discussion there seems like "_start" or something like it is needed (although I've suggested a different less confusing name) but the problem is that wasmer and lucet and throwing an exception when "_start" isn't exported (or is swallowing the exception). |
This is also being discussed here: WebAssembly/WASI#19 |
Closing the ticket here in favor of: WebAssembly/WASI#19 |
Correct types field in package.json
Describe the bug
wasmer 0.3.0 appears to assume that a wasm module exports a "_start" function. This should either be optional or dropped since (start ...) is already supported and is called before the exported "_start" routine.
Steps to reproduce
The following wat file:
Will result in the following:
Note that the function specified by (start) is being called and then the exception is thrown. If both (start) and exported "_start" are used (uncomment export above) then the main function is executed twice as follows:
Expected behavior
wasmer should not require "_start" to be exported since this functionality is already supported by the standard (start) mechanism.
The text was updated successfully, but these errors were encountered: