-
Notifications
You must be signed in to change notification settings - Fork 958
TinyGo v0.35.0
breaks convention on Command modules for exported functions
#4726
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
Labels
wasm
WebAssembly
Comments
deadprogram
added a commit
that referenced
this issue
Feb 12, 2025
…xpected the older behavior for wasi modules to not return an exit code as if they were reactors. See #4726 for some details on what this is intended to address. Signed-off-by: deadprogram <[email protected]>
Please see #4734 for an attempt to address this. |
deadprogram
added a commit
that referenced
this issue
Feb 18, 2025
…who expected the older behavior for wasi modules to not return an exit code as if they were reactors. See #4726 for some details on what this is intended to address. Signed-off-by: deadprogram <[email protected]>
Thank you very much @deadprogram! Looking forward for PR being merged. |
deadprogram
added a commit
that referenced
this issue
Feb 18, 2025
…who expected the older behavior for wasi modules to not return an exit code as if they were reactors. See #4726 for some details on what this is intended to address. Signed-off-by: deadprogram <[email protected]>
deadprogram
added a commit
that referenced
this issue
Feb 21, 2025
…who expected the older behavior for wasi modules to not return an exit code as if they were reactors. See #4726 for some details on what this is intended to address. Signed-off-by: deadprogram <[email protected]>
Closed as part of v0.36.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Until very recently TinyGo had no support for compiling Reactor modules which have
_initialize
function as opposed to_start
in Command modules. This, as well as some other reasons lead to community convention which worked for some years. In short according to WASI, Commands should exit after_start
finished and as a result module with its exported functions becomes invalid.However, TinyGo as well as some other compilers did not exit, which made it possible to call exported functions even after
_start
exited.For instance Wazero, the most popular Wasm runtime in Go world has special note in documentation on this:
There are well-established and popular tools and libraries in the wild which are built on top of this assumption, for instance https://github.com/knqyf263/go-plugin which generates helper stubs based on
*.proto
definitions. Generated code is based heavily on existing tools and their proven behavior, such as Wazero and TinyGo (pre-v0.35.0).And a lot of tooling and code (including my own and the company I work in) is already in production.
This is good post by Matt Johnson-Pint in Slack which summarizes what's happened:
I understand that TinyGo is still in it's
v0.*.*
stage and can break some things, but during last releases it happens almost all the time, in almost every release.This change it too much destructive. It's not that easy to re-implement all modules as the Reactors with changes all over community code. For example see this comment in
go-plugin
repo. I think as a consequence a lot of applications could stick to older TinyGo (pre-v0.35.0) forever.I propose to revert this change, or at least give some time for community to adapt, providing compiler option to make TinyGo-compiled Wasm modules backwards-compatible with existing code.
The text was updated successfully, but these errors were encountered: