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

wasm: implement the //go:wasmimport directive #3165

Merged
merged 1 commit into from
Mar 22, 2023
Merged

wasm: implement the //go:wasmimport directive #3165

merged 1 commit into from
Mar 22, 2023

Conversation

aykevl
Copy link
Member

@aykevl aykevl commented Sep 15, 2022

It is implemented upstream almost implemented upstream and looks pretty stable.

@neelance I'd like to get your opinion on this.
This would mean that TinyGo implements the //go:wasmimport directive for all packages (not just runtime and syscall/js). This seems mostly safe to me, and certainly better than the current //go:wasm-module directive that we're using. What do you think, am I missing something?
The ABI will be mostly the same as the one used in the Go toolchain, with minor differences here and there. It roughly matches the C ABI.

@codefromthecrypt
Copy link
Contributor

fyi, this isn't quite in upstream, yet, though I personally support using this anyway https://go-review.googlesource.com/c/go/+/350737

@aykevl
Copy link
Member Author

aykevl commented Sep 15, 2022

fyi, this isn't quite in upstream, yet

My bad, thanks for correcting.

@gedw99
Copy link

gedw99 commented Oct 6, 2022

basic question...

//go:wasmimport directive is for Browser side or server side ? Or both ?

I wonder if this will also need to catchup ? chrome://extensions/?id=pdcpmagijalfljmkmjngeonclgbbannb
It is the chrome dwarf debugger extension used to debug tinygo in the Chrome Browser.

@anuraaga
Copy link
Contributor

anuraaga commented Mar 2, 2023

golang/go@02411bc has landed so hopefully this can move forward :)

@deadprogram
Copy link
Member

Reminder to @aykevl about this one 🛩️

It is implemented upstream and looks pretty stable.
@aykevl aykevl marked this pull request as ready for review March 21, 2023 23:59
@aykevl
Copy link
Member Author

aykevl commented Mar 21, 2023

Updated and removed the commits from #3142 from this PR.

@deadprogram
Copy link
Member

We also need to update examples/wasm/export and the associated README with this change. I can submit a separate PR.

Thanks everyone for working on this, exciting to see this moving forward! Now merging.

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.

5 participants