Description
Currently, init()
functions do not run in wasip2
reactor components run in Wasmtime 25.
A recent change to wasm-tools
introduced support for _initialize
in component new
step bytecodealliance/wasm-tools#1747, however even with:
wasm-tools 0.218
tinygo 0.33
init()
functions do not run in reactors, which manifests in e.g. stdio not being available and runtime panics e.g. printing to os.Stdout
It's possible that the outdated WASI-libc version is the cause here, I'll try updating it and report
Refs #4482
Update 1:
neither updating vendored wasi-libc
to WebAssembly/wasi-libc@5ed3ec5, nor https://github.com/WebAssembly/wasi-libc/commits/wasi-sdk-22 seemed to have changed anything, but I'm also not familiar with the build process enough to know if I had to do something more that just go install
to make sure TinyGo uses the latest wasi-libc