Open elewis787 opened 1 month ago
The affected code is not used in the current TinyGo implementation.
In suppose we could make this work in Go, but not TinyGo.
I could see it being helpful for go.
Using go 1.24, I was able to use it and then convert a wasip1 module to a component with the adapters. There are likely edge cases I haven't run into.
Mainly just wanted to see if there was more context that I wasn't thinking of 😄.
Calling out that I did use this in a wasmtime-go host implementation when executing an exported function in a module compiled in both go and tiny-go targeting wasip1.
Have you had any luck just using go:linkname
with this package, or reimplementing it in your own package?
Reimplementing it in my own package worked. I will look into the go:linkname
.
Are there details on why the export tags for cabi_realloc were removed in 88cdc52
This still seems relevant when targeting wasip1 and using the wasi adapters ( such as the reactor adapter ) to build a component. I have tested this by adding my own cabi_realloc function and using the export tags, then converting to a wasip2 component using the wasmtime adapters.
GOOS=wasip1 GOARCH=wasm go build -o main.wasm main.go
experimenting here https://github.com/elewis787/lex
I believe this relates to the work at https://github.com/tinygo-org/tinygo/pull/4451 and https://github.com/golang/go/issues/65199 but hope for some details.
My goal is to use the wit bindings for exported functions and build a wasip2 reactor component in tinygo or go.