888 karma · joined November 13, 2013
Currently I am back at Red Hat, AI Inference Engineering.
evacchi.dev
Why pure-Java? It's just a library! Pull it in and see if it works for you, you won't need to rely on any native dependency. With this version we are also shipping both an in-memory and an off-line translator from Wasm to Java bytecode.
disclaimer: I work there
(*) as long as there is a toolchain that supports using it on Wasm :P
[1]: https://wazero.io/
full disclosure: I don't work on it, but the devs are committers/contributors to https://wazero.io (I am a wazero committer) :)
as for the second, that's an excellent question but I'll have to be honest and tell you that I am the n00b of the team and I don't know the answer :D
I can refer you to these possibly related docs
- https://github.com/tetratelabs/wazero/blob/main/RATIONALE.md...
- https://wazero.io/docs/how_do_compiler_functions_work/ (e.g. traps are handled on the Go side)
...and then my awesome team mates might get back to you with a proper answer later when they wake up :^)
The good news is an optimizing backend is being worked on as we speak and should be available very soon :)
wazero under the hood, by one of our awesome community members
This is not just one of those "written in $LANG" kinda deal: most other runtimes require linking against a native library; this in turn plays against a lot of the killer features of Go, such as good tooling, easy cross-compilation, goroutines [0]; so, not requiring Cgo means a team may bring wazero to their Go project without a second thought.
As for other features, we may not be as bleeding edge as other projects, but we are a rather tiny team. If you expect support for WASI (preview 1) we have it :) we try to concentrate our effort on high-quality support of stable specs.
EDIT: oh, and a huge shout-out to Stealthrocket, they are building a lot of cool stuff on top of wazero:
- wzprof, a wasm profiler integrating with pprof https://github.com/stealthrocket/wzprof
- timecraft, a wasm time-traveling runtime https://github.com/stealthrocket/timecraft
[0] see "CGO is not Go" https://dave.cheney.net/2016/01/18/cgo-is-not-go
The Wasm model itself gives a certain degree of safety: e.g. you do not have complete control over the host OS, because you have to explicitly expose functions to the gues module; we also provide a certain degree of control over e.g. execution time (you can instantiate a module in such a way that executions can be cancelled or set a timeout) and memory space.
We also provide an interpreter for all platforms where Go runs, and Takeshi (the founder of the project) is also working on bootstrapping an optimizing compiler that should soon land on main, and more work will happen in that space.