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

compiler, runtime: enable go:wasmexport for wasip2 #4499

Merged
merged 3 commits into from
Oct 5, 2024

Conversation

ydnar
Copy link
Contributor

@ydnar ydnar commented Oct 4, 2024

This builds on #4451 to enable //go:wasmexport for wasip2 (WASI Preview 2).

  • //go:wasmexport is now permitted and supersedes //go:export and //export if both are present.
  • The wasip2 target now defaults to -buildmode=c-shared, since all WASI 0.2+ programs are reactors.
  • main.main is called by the wasi:cli/run#run export in a wasmexport.

@ydnar ydnar requested review from aykevl and dgryski October 4, 2024 22:38
@ydnar ydnar self-assigned this Oct 4, 2024
Copy link
Member

@dgryski dgryski left a comment

Choose a reason for hiding this comment

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

LGTM, except for the renamed import (which I'm fine to handle later)

src/runtime/runtime_wasip2.go Outdated Show resolved Hide resolved
@ydnar
Copy link
Contributor Author

ydnar commented Oct 4, 2024

Want me to rename back?

@dgryski
Copy link
Member

dgryski commented Oct 4, 2024

Yes, but if you just want this merged we can do it in a separate PR later.

Copy link
Member

@dgryski dgryski left a comment

Choose a reason for hiding this comment

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

LGTM

@ydnar ydnar merged commit 453a1d3 into tinygo-org:dev Oct 5, 2024
17 checks passed
@ydnar ydnar deleted the ydnar/wasip2-c-shared branch October 5, 2024 00:46
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