tinygo
tinygo copied to clipboard
wasm: implement the //go:wasmimport directive
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.
fyi, this isn't quite in upstream, yet, though I personally support using this anyway https://go-review.googlesource.com/c/go/+/350737
fyi, this isn't quite in upstream, yet
My bad, thanks for correcting.
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.
https://github.com/golang/go/commit/02411bcd7c8eda9c694a5755aff0a516d4983952 has landed so hopefully this can move forward :)
Reminder to @aykevl about this one :small_airplane:
Updated and removed the commits from #3142 from this PR.
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.