wazero
wazero copied to clipboard
integration with an embeddable go source compiler
This tracks any stories around embedding wazero in the same process that compiles Go source code to wasm.
Use cases
UDF
User Defined Function ( UDF ) as where the user can create functions, and so requires that the golang code be compiled to wasm on the fly without recompile. The embedder provides a Web area to edit golang, and wazero recompiles the wasm at runtime.
Thanks to @gedw99 for this use case
Ideas
TinyGo+Docker
TinyGo has system dependencies and forks processes, which makes it hard to embed into a go application. However, one idea is to use docker to contain the tinygo compiler.
Embed tinygo and then extract it to the file system at init time. Run with docker compose with one docker for wazero and one for tinygo.
Thanks to @gedw99 for this idea