Closed rvolosatovs closed 1 month ago
Currently, init() functions do not run in wasip2 reactor components run in Wasmtime 25.
init()
wasip2
A recent change to wasm-tools introduced support for _initialize in component new step https://github.com/bytecodealliance/wasm-tools/pull/1747, however even with:
wasm-tools
_initialize
component new
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
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 https://github.com/WebAssembly/wasi-libc/commit/5ed3ec5701b58347d28a87c84ccc95f9c54b0148, 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
wasi-libc
go install
Currently,
init()
functions do not run inwasip2
reactor components run in Wasmtime 25.A recent change to
wasm-tools
introduced support for_initialize
incomponent new
step https://github.com/bytecodealliance/wasm-tools/pull/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 toos.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 https://github.com/WebAssembly/wasi-libc/commit/5ed3ec5701b58347d28a87c84ccc95f9c54b0148, 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 justgo install
to make sure TinyGo uses the latestwasi-libc