wazero 1.0.2 improves compiler performance, supports non-blocking stdin and adds a couple new experimental APIs.
Many people were involved in a lot of work in the last 3 weeks. Please reach out and thank them!
Improved compiler performance
wazero has a compile phase (CompileModule) which lowers WebAssembly bytecode into an intermediate representation (IR) and into machine code. This process is CPU and memory intensive and has been optimized significantly since 1.0.1.
We used SQLite wasm, to ensure the encouraging improvements were relevant to real-world use cases.
All of this was easier due to frequent and thorough advice by @achille-roussel and our latest core maintainer @ncruces. Thanks to all involved for the epic improvement in less than 3 weeks!
Non-blocking stdin
container2wasm is an interesting project that converts containers such that they can run in a webassembly runtime, such as a browser or wazero.
One feature this relies on is non-blocking access to STDIN. Like some other runtimes, wazero didn't handle this properly.
Thanks to a lot of effort by @evacchi with advice from @achille-roussel and support from the container2wasm author @ktock, wazero now handles non-blocking STDIN properly (via the select syscall).
Experimental changes
Code in our "experimental" directory isn't under an API guarantee, so can change even in a patch version. Here are a couple new experiments since last release.
@pelletier added a StackIterator parameter to listeners, allowing inspection of the stack leading to a function call. Thanks to @Pryz for the initial design and background, as this is used for CPU profiling data.
@codefromthecrypt added emscripten.InstantiateForModule to dynamically build function imports given a CompiledModule. Thanks to @jerbob92 for the idea and testing with various PDF tools.
... (truncated)
Commits
ea33606 wasi: introduce platform.Select and use it for poll_oneoff (#1346)
ab78591 Revert "examples(allocation): free memory after unmarshalling a result from t...
df0faa5 emscripten: adds experimental InstantiateForModule for invoke exports (#1372)
2a2e07a asm/arm64: uses enum for operand types (#1378)
5aafcc4 examples(allocation): free memory after unmarshalling a result from the guest...
6a4bdd3 compiler: fixes false-positive invalid ptr detection in -race (#1376)
9aca08c Provide new StackIterator to Before Listener hook (#1363)
cd34767 Fixes race where HostFunc names are needlessly lazy set (#1375)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps github.com/tetratelabs/wazero from 1.0.1 to 1.0.2.
Release notes
Sourced from github.com/tetratelabs/wazero's releases.
... (truncated)
Commits
ea33606
wasi: introduce platform.Select and use it for poll_oneoff (#1346)ab78591
Revert "examples(allocation): free memory after unmarshalling a result from t...df0faa5
emscripten: adds experimental InstantiateForModule for invoke exports (#1372)2a2e07a
asm/arm64: uses enum for operand types (#1378)5aafcc4
examples(allocation): free memory after unmarshalling a result from the guest...6a4bdd3
compiler: fixes false-positive invalid ptr detection in -race (#1376)9aca08c
Provide new StackIterator to Before Listener hook (#1363)cd34767
Fixes race where HostFunc names are needlessly lazy set (#1375)b32189e
wasi: fix zig-cc/wasi.c repeat arg (#1371)9263bef
logging: fixes bug where unsampled logger is called from a sampled one (#1369)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)