Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump github.com/tetratelabs/wazero from 1.6.0 to 1.7.0 in /sdks #30731

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 25, 2024

Bumps github.com/tetratelabs/wazero from 1.6.0 to 1.7.0.

Release notes

Sourced from github.com/tetratelabs/wazero's releases.

v1.7.0

Welcome to wazero 1.7: the release that upgrades like a minor, but feels like a major!

It's finally time for the long-awaited, final release of our brand new optimizing compiler. This is such a big deal that we are celebrating it at [Wasm I/O 2024][wasmio] with another round of wonderful lightning talks from wazero users [like we did in 2023][wazero1]. In fact, even this release is being tagged during the event! Stay tuned on our usual channels to see the recording:

  • Follow the [#wazero hashtag on Twitter][twitter]
  • Join the [#wazero channel on the Gophers Slack][gophers]

wazero optimizes machine code compiled from wasm

Translating Wasm bytecode into machine code can take multiple forms. An optimizing compiler performs multiple nontrivial transformations on the input code, ultimately producing more efficient ("optimized") code.

In 1.7 we replaced our internal wasm compiler with an optimizing one. This means it is a drop-in: you don’t need to do anything to use it. If interested in compiler design, please read [the docs][wazevo-docs], contributed by @​evacchi.

As for performance improvements, we have come to expect a run-time boost ranging from 10% to even 60%, with 30-40% being the average. Notably:

  • @​ncruces' fork of [coremark][coremark] shows an improved score of 15265 vs 9591, i.e. about +60% on arm64 (Apple M1 Pro)
  • [mercari/grpc-federation][mercari] improvements between 4-10% on their Wasm extensions to the [Common Extension Language][cel]
  • [kubernetes-sigs/kube-scheduler-wasm-extension][k8s-sched] sees an average of >40% decrease on schedule lifecycle overhead
  • @​achille-roussel [contributed some numbers][achille-slack] on the Go standard library (GOOS=wasip1) showing at least 30% improvements on the syscall, compress/flate (gzip) and encoding/json packages, with peaks of 60% (especially in data throughput).

While a major improvement, we decided against calling this version 2.0. If we did, we would cause library dependency lockups due to go imports needing a ‘/v2’. We take backwards compatibility seriously, so couldn’t do that to you!

As usual, @​mathetake owns the lionshare of the contributions, with @​evacchi helping along the way, especially on the new amd64 backend. Notably, @​achille-roussel also contributed a performance improvement to the compiler (#2026) and @​ncruces helped in many ways with testing and verifying the implementation, validating (among other things) against his library [go-sqlite3][go-sqlite3].

Note: an optimizing compiler does more work, so it takes longer. Production use of wazero should always compile wasm during initialization to avoid slowing down function runtime.

Experimental: Wasm Threads Spec

The Wasm Threads spec introduces instructions to explicitly share memory between modules, and new operations for atomic memory access. Compilers may use this feature for concurrent threads of execution. For instance @​anuraaga’s [Go ports of protoc plugins][protoc] needed atomic instruction support to compile to Wasm.

1.7 concludes a long journey started with @​anuraaga's first PR #1899 and continued with @​mathetake occasionally tag-teaming, especially to support in the new compiler; @​ncruces assisted with reviewing.

You can enable Wasm Threads support by setting the corresponding flag:

     // Threads support must be enabled explicitly in addition to standard V2 features.
     cfg := wazero.NewRuntimeConfig().
           WithCoreFeatures(api.CoreFeaturesV2 | experimental.CoreFeaturesThreads)

For a usage example see features_example_test.go

Experimental: Snapshot/Restore

The Snapshot/Restore experimental feature saves the state of a wasm function and restores it later. This feature has been contributed by @​anuraaga to implement exception handling in [wasilibs/go-pgquery][go-pgquery]

You can enable snapshot/restore by setting the context flag:

</tr></table> 

... (truncated)

Commits
  • 253c034 ci: removes unnecessary matrix.include (#2155)
  • 2bbe81a wazevo(frontend): allocation free initializeCurrentBlockKnownBounds (#2154)
  • 1b3f80b ci: always use the same command to upload artifacts (#2153)
  • b4f47d9 fuzz: adds --no-trace-compares flag by default (#2152)
  • 291fdf8 wazevo: fixes accidental heap allocation in VarLengthPool.Allocate (#2151)
  • 0255886 regalloc: fast check for preferred in findOrSpillAllocatable (#2150)
  • 5760022 validation: handles edge case of unexpected else (#2148)
  • a05f23b wasi: uses the shared compilation cache in tests (#2149)
  • 9f56676 testing: removes remaining gotip usage (#2147)
  • c4532da testing: pass N, P into Run of hammer (#2146)
  • Additional commits viewable in compare view

Dependabot compatibility score

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 show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @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](https://github.com/tetratelabs/wazero) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/tetratelabs/wazero/releases)
- [Commits](tetratelabs/wazero@v1.6.0...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/tetratelabs/wazero
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go labels Mar 25, 2024
Copy link

codecov bot commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.45%. Comparing base (ae9eb5f) to head (dc0a234).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #30731      +/-   ##
==========================================
- Coverage   71.46%   71.45%   -0.01%     
==========================================
  Files         710      710              
  Lines      104795   104795              
==========================================
- Hits        74894    74885       -9     
- Misses      28269    28276       +7     
- Partials     1632     1634       +2     
Flag Coverage Δ
go 54.31% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

Copy link
Contributor

github-actions bot commented Apr 2, 2024

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @jrmccluskey for label go.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.45%. Comparing base (ae9eb5f) to head (dc0a234).
Report is 46 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #30731      +/-   ##
==========================================
- Coverage   71.47%   71.45%   -0.02%     
==========================================
  Files         710      710              
  Lines      104795   104795              
==========================================
- Hits        74903    74885      -18     
- Misses      28260    28276      +16     
- Partials     1632     1634       +2     
Flag Coverage Δ
go 54.31% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jrmccluskey jrmccluskey merged commit 1ea9054 into master Apr 2, 2024
9 checks passed
@dependabot dependabot bot deleted the dependabot/go_modules/sdks/github.com/tetratelabs/wazero-1.7.0 branch April 2, 2024 19:44
hjtran pushed a commit to hjtran/beam that referenced this pull request Apr 4, 2024
…he#30731)

Bumps [github.com/tetratelabs/wazero](https://github.com/tetratelabs/wazero) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/tetratelabs/wazero/releases)
- [Commits](tetratelabs/wazero@v1.6.0...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/tetratelabs/wazero
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file go Next Action: Reviewers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants