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

fix: support TinyGo 0.35.0 #662

Merged
merged 5 commits into from
Dec 23, 2024
Merged

Conversation

mattjohnsonpint
Copy link
Member

Description

TinyGo 0.35.0 added an os.Exit(0) to the end of their _start function, which is appropriate for commands, but not for reactors. The effect is that you cannot call any function, because the program has terminated.

To resolve, we should treat Modus apps as reactors, by using -buildmode=c-shared when compiling. That has the side-effect of changing the startup function from _start (the Wazero default) to _initialize. Thus, we must also make the Modus runtime call whichever of those two startup functions is in the wasm module.

Checklist

  • Code compiles correctly and linting passes locally
  • For all code changes, an entry added to the CHANGELOG.md file describing and linking to this PR

@mattjohnsonpint mattjohnsonpint requested a review from a team as a code owner December 23, 2024 23:07
@mattjohnsonpint mattjohnsonpint enabled auto-merge (squash) December 23, 2024 23:22
@mattjohnsonpint mattjohnsonpint merged commit 358c617 into main Dec 23, 2024
62 checks passed
@mattjohnsonpint mattjohnsonpint deleted the mjp/hyp-2785-update-for-tinygo-0350 branch December 23, 2024 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants