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

Add support for Emscripten version 3.1.57 #2290

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

jerbob92
Copy link
Contributor

@jerbob92 jerbob92 commented Jul 19, 2024

Emscripten has removed some exported functions and replaced them with pure JS functions. They still reference native methods though, they just have a different name and the JS method is just an alias for the native function.

This PR adds the ability to add function aliases for exported Emscripten functions, since Emscripten renamed some exports on their side, see emscripten-core/emscripten#21555

This change is backwards compatible.

@jerbob92 jerbob92 requested a review from mathetake as a code owner July 19, 2024 12:05
@jerbob92 jerbob92 force-pushed the emscripten-support-3.1.57 branch 2 times, most recently from 6cb2228 to f3c7add Compare July 19, 2024 12:11
Copy link
Member

@mathetake mathetake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the backward incompatibility introduced by Emscripten, so I would prefer just remove the old names - the only promise we make is the API of our public Go package stability and this is different. in other words, this could potentially accumulate overtime and we have to remove the tech debt at some point future vs now

@jerbob92
Copy link
Contributor Author

@mathetake that would also be fine, but that does mean that any wasm file compiled with Emscripten < 3.1.57 will suddenly stop working after upgrading Wazero without a clear indication why.

@jerbob92 jerbob92 closed this Jul 19, 2024
@jerbob92 jerbob92 reopened this Jul 19, 2024
@mathetake
Copy link
Member

yeah, that's unfortunate but as long as we put that in the release note, this should be good

Signed-off-by: Jeroen Bobbeldijk <[email protected]>
@jerbob92
Copy link
Contributor Author

@mathetake I have removed the backwards compatible code. Can you tell me how you compile the .wat files? When I use wabt I get a different output, but perhaps that has to do with wabt options and/or version.

Signed-off-by: Takeshi Yoneda <[email protected]>
@mathetake
Copy link
Member

pushed the fix!

@mathetake mathetake merged commit c345ddf into tetratelabs:main Jul 19, 2024
54 checks passed
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