Skip to content

v1.0.0-rc.2

Compare
Choose a tag to compare
@github-actions github-actions released this 16 Mar 05:12
· 860 commits to main since this release
576ef24

wazero v1.0.0-rc.2 is a stabilizing release, and the last version before 1.0 next week.

wazero 1.0.0 will happen at our release party attended by many contributors present at wasmio in Barcelona. While this is our first community meetup, it won't be our last. Please join us to suggest or help organize subsequent events.

Below are a list of changes, notably new is operating system packaging. Read on to get the full story!

Packaging

@mathetake and @evacchi worked together to publish OS artifacts, you can see attached to this release. Most work was needed around windows as MSI installers need to be signed to avoid warnings. We'll begin distributing wazero via homebrew and winget soon, as well.

Tests

Thanks particularly to @codefromthecrypt and @evacchi, wazero is more tested than we were before, and more than any other runtime we are aware of. We've notably closed gaps not just in WASI, but edge cases around windows and GOOS=js. @mathetake stepped in not just in support of tests, but also adding a test flow so we can code in confidence:

image

Website

wazero already has extensive code documentation, examples, low-level RATIONALE and language guides.

We have work, yet, on high-level and conceptual documentation. To start, @mathetake added a documentation page, covering architecture and some low-level questions. @evacchi also polished the home page, now that we're focusing a lot more on our CLI user base.

Performance

@mathetake has worked relentlessly to improve performance, especially around initialization of modules. This is analogous to startup time. You can see some of the dramatic improvements below:

$ benchstat v1.0.0-rc.1.txt v1.0.0-rc.2.txt
name                                    old time/op    new time/op    delta
Initialization/interpreter-32             52.9µs ± 2%    36.1µs ± 2%  -31.74%  (p=0.000 n=28+25)
Initialization/interpreter-multiple-32    39.9µs ± 2%    39.7µs ±13%     ~     (p=0.140 n=29+30)
Initialization/compiler-32                32.2µs ± 7%    28.3µs ± 9%  -12.09%  (p=0.000 n=30+30)
Initialization/compiler-multiple-32       25.3µs ± 5%    24.5µs ± 8%   -3.29%  (p=0.000 n=30+26)
Compilation/with_extern_cache-32           206µs ± 2%     200µs ± 2%   -2.78%  (p=0.000 n=29+30)
Compilation/without_extern_cache-32       6.00ms ± 1%    5.94ms ± 1%   -0.95%  (p=0.000 n=29+30)

name                                    old alloc/op   new alloc/op   delta
Initialization/interpreter-32              137kB ± 0%     136kB ± 0%   -0.35%  (p=0.000 n=30+30)
Initialization/interpreter-multiple-32     137kB ± 0%     137kB ± 0%   -0.04%  (p=0.000 n=27+27)
Initialization/compiler-32                 141kB ± 0%     137kB ± 0%   -3.09%  (p=0.000 n=30+23)
Initialization/compiler-multiple-32        142kB ± 0%     142kB ± 0%   -0.03%  (p=0.000 n=27+25)
Compilation/with_extern_cache-32          55.6kB ± 0%    54.6kB ± 0%   -1.79%  (p=0.000 n=29+30)
Compilation/without_extern_cache-32       1.99MB ± 0%    1.99MB ± 0%   -0.12%  (p=0.000 n=30+30)

name                                    old allocs/op  new allocs/op  delta
Initialization/interpreter-32               52.0 ± 0%      38.0 ± 0%  -26.92%  (p=0.000 n=30+30)
Initialization/interpreter-multiple-32      58.0 ± 0%      57.0 ± 0%   -1.72%  (p=0.000 n=30+30)
Initialization/compiler-32                  42.0 ± 0%      38.0 ± 0%   -9.52%  (p=0.000 n=30+30)
Initialization/compiler-multiple-32         48.0 ± 0%      47.0 ± 0%   -2.08%  (p=0.000 n=30+30)
Compilation/with_extern_cache-32           1.10k ± 0%     0.98k ± 0%  -10.86%  (p=0.000 n=27+30)
Compilation/without_extern_cache-32        32.7k ± 0%     32.6k ± 0%   -0.37%  (p=0.000 n=30+30)

To support future improvements, we no longer allow importing unnamed modules (moduleName=""). This is an edge case allowed by spec, but not used in practice. By disallowing this, future versions of wazero can be considerably faster instantiating anonymous modules than today.

Changes in support of wasm compiled by Go

Some of you know Go builds wasm binaries when the environment variables GOARCH=wasm and GOOS=js are set. We include an experimental package gojs which supports this until Go includes a WASI operating system for at least 2 releases. We support gojs in part due to users who want an alternative runtime besides node.js. The other reason is to help support future development in the Go compiler. Our hope is developers can quickly check behavior between JS and WASI, so that problems are solved quicker.

The main change in this version is moving the gojs directory under the experimental folder. It was always experimental, but via documentation. This should help people know that this operating system is temporary until Go supports WASI (GOOS=wasip1) for at least 2 releases.

The other change is exposing gojs.Config with additional go-specific feature toggles, enabled by default in our CLI. This allows things not defined in WASI to pass, for example functionality about the working directory or user IDs of the process. This allows wazero to pass 100pct of the os package tests defined by Go.