-
Notifications
You must be signed in to change notification settings - Fork 12
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
proposal: implement Canonical ABI realloc (cabi_realloc) #2
Comments
The current TinyGo garbage collector exports the following realloc implementation:
|
@dgryski is that exported in the Wasm module? |
No, it's currently only available to the runtime. "Exports" should have read "exposes to the rest of the runtime". |
ydnar
added a commit
that referenced
this issue
Oct 17, 2023
ydnar
added a commit
that referenced
this issue
Oct 17, 2023
ydnar
changed the title
proposal: cabi_realloc
proposal: implement Canonical ABI realloc (cabi_realloc)
Oct 19, 2023
ydnar
added a commit
that referenced
this issue
Oct 19, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In order for host → guest calls to pass complex types with unknown sizes, the host must be able to allocate memory in the guest. See: https://github.com/search?q=repo%3Abytecodealliance%2Fwit-bindgen%20cabi_realloc&type=code
The
realloc
function defined in the Canonical ABI has the following signature:(func (param i32 i32 i32 i32) (result i32))
Prerequisites
TODO
import _ github.com/ydnar/wasm-tools-go/abi
?abi
package into Go stdlib, or vendor it forGOOS=wasip2
support?Design
Go
Hypothetical Go design:
Prior Art
C
Rust
Python
The text was updated successfully, but these errors were encountered: