-
Notifications
You must be signed in to change notification settings - Fork 10
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
Exported WebAssembly function cabi_realloc #184
Comments
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 |
Reimplementing it in my own package worked. I will look into the |
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 tinygo-org/tinygo#4451 and golang/go#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.
The text was updated successfully, but these errors were encountered: