How to perform Wasm host call from a Go guest?

402 Views Asked by At

How can one call custom Wasm host functions from a Go guest?

I've looked at a few examples that show loading a self-contained witx/wat/wasm defined function, but haven't found an example for performing a host-defined call. Some examples I've looked at are for wazero and wasmtime-go here:

It would be ideal to be able to make these WebAssembly host calls using pure Go if possible.

Specifically, I'm trying to implement the host calls from the Fastly Compute@Edge ABI defined by compute-at-edge.witx and typenames.witx, but this should be generally applicable to any host defined call / function.

0

There are 0 best solutions below