top | item 31413208

(no title)

adrianfcole | 3 years ago

nope this is all under the scenes. We formerly called this JIT, which was inaccurate but removed this confusion. Calling it AOT is more precise, but people ask this question. win some you lose some I guess!

Anyway, if you use `wazero.NewRuntime()` magically it redirects to `wazero.NewRuntimeCompiler()`[1]. When the compiler is in use, all the native stuff happens automatically and you don't need to change your binary based on the wasm you use.

This is actually neater than it seems as embedded compiler is goroutine safe, meaning you can compile modules concurrently.

https://pkg.go.dev/github.com/tetratelabs/wazero#NewRuntimeC...

discuss

order

skybrian|3 years ago

It sounds promising!

When explaining it, it might be a good idea to focus on a little more on what this technology can do for you: "How to add cross-platform plugin support to a Go program using WebAssembly."