wasm: add //go:wasmexport support (#4451)

This adds support for the `//go:wasmexport` pragma as proposed here:
https://github.com/golang/go/issues/65199

It is currently implemented only for wasip1 and wasm-unknown, but it is
certainly possible to extend it to other targets like GOOS=js and
wasip2.
This commit is contained in:
Ayke
2024-10-05 00:33:47 +02:00
committed by GitHub
parent 407889864f
commit 9da8b5c786
22 changed files with 765 additions and 67 deletions
+3
View File
@@ -1,5 +1,8 @@
//go:build tinygo.wasm && !wasm_unknown && !wasip2
// This file is for wasm/wasip1 and for wasm/js, which both use much of the
// WASIp1 API.
package runtime
import (