dependabot[bot] opened a new pull request, #27162: URL: https://github.com/apache/beam/pull/27162
Bumps [github.com/tetratelabs/wazero](https://github.com/tetratelabs/wazero) from 1.2.0 to 1.2.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tetratelabs/wazero/releases">github.com/tetratelabs/wazero's releases</a>.</em></p> <blockquote> <h2>v1.2.1</h2> <p>wazero 1.2.1 is an easy upgrade decision for everyone: There is no public API change of any kind, yet updating gives you a more portable and faster wasm runtime.</p> <p>This release was helped and motivated by friendly projects in our ecosystem, please star their repos!</p> <ul> <li><a href="https://github.com/golang/go/stargazers">go</a> needs non-blocking I/O for the new <code>GOOS=wasip1</code>, for example, running an HTTP server with middleware, using only one thread.</li> <li><a href="https://github.com/ncruces/go-sqlite3/stargazers">go-sqlite3</a> wants smaller and faster machine code to make queries more performant.</li> <li><a href="https://github.com/stealthrocket/wasi-go/stargazers">wasi-go</a> collaborated on a different approach to non-blocking I/O.</li> </ul> <p>As usual, we have a hefty amount of background for you to enjoy, even if you aren't a wazero user, yet. Please <a href="https://github.com/tetratelabs/wazero/stargazers">star our repo</a> if you like it!</p> <h3>Progress in non-blocking I/O</h3> <p>WebAssembly does not yet support true parallelism; it lacks support for multiple threads, atomics, and memory barriers. This may be addressed portably in the future, when the <a href="https://github.com/WebAssembly/proposals#phase-3---implementation-phase-cg--wg">threads proposal standardizes</a> and common concerns like garbage collection employ it. For now, the only way to safely use wasm is sequentially, like how <code>GOMAXPROCS=1</code> works in Go.</p> <p>This isn't a problem in a lot of cases, but in I/O it can be. Network services often need to accept new connections while processing existing ones. Interleaving of this isn't viable with blocking I/O. The typical way to address this is using non-blocking I/O, with a loop that looks for channels which are ready and processes accordingly.</p> <p>As mentioned in the <a href="https://github.com/tetratelabs/wazero/releases/tag/v1.2.0">1.2.0 release</a>, non-blocking I/O is a work in progress, and it is improved in 1.2.1. This is improved so much that <a href="https://github.com/chriso"><code>@chriso</code></a> was able to <a href="https://go-review.googlesource.com/c/go/+/503595">remove skips</a> for HTTP and file-based non-blocking tests in the emerging <code>GOOS=wasip1</code> in Go 1.21.</p> <p><a href="https://github.com/evacchi"><code>@evacchi</code></a> focused on the problem of non-blocking I/O, both network sockets and files. He both invented some solutions and leveraged existing approaches from <a href="https://github.com/stealthrocket/wasi-go">wasi-go</a> to fix issues such as inability to use HTTP middleware in Go source compiled to wasm. To make sure it worked, he landed new tests, for example C code compiled with wasi-libc and go(tip) compiled with <code>GOOS=wasip1</code>.</p> <p>The changes are all transparent to end users, and while Edo led this effort, <a href="https://github.com/achille-roussel"><code>@achille-roussel</code></a> and <a href="https://github.com/chriso"><code>@chriso</code></a> deserve a large thank you for support and the some prior art in <a href="https://github.com/stealthrocket/wasi-go">wasi-go</a>.</p> <p>One final note is the battle is not over. We still have work to do in windows and surely there will be more edge cases. Please track <a href="https://redirect.github.com/tetratelabs/wazero/issues/1500">issue 1500</a> and add comments if you noticed any more glitches.</p> <h3>Significant execution time savings</h3> <p>While developing <a href="https://github.com/ncruces/go-sqlite3">go-sqlite3</a>, <a href="https://github.com/ncruces"><code>@ncruces</code></a> noticed some opportunities both to save size in machine code and performance. This focused on "traps" which are unresolvable execution errors that happen in cases such as divide by zero or invalid bounds conditions. The basic idea was to centralize the concern, so that any instruction that could trap uses the same way out of machine code.</p> <p>While developing this, Nuno found a glitch which is fast-pathing these cases can interfere with source code mapping. For example, if you were using a debugger or using a DWARF-enabled trace, the line numbers could be wrong. After discussing with others, a pragmatic way out was chosen: optimize when there is either no debug information (usually the case in release builds) or if <code>RuntimeConfiguration.WithDebugInfoEnabled</code> is set to false. The latter is helpful, because it can be difficult to <a href="https://redirect.github.com/llvm/llvm-project/issues/55781">prevent a compiler from obfuscating function names</a>, so some may use debug builds always. This is handy in the case of a rare bug such as a nil pointer, because you can still identify original source function by name.</p> <p>While led by <a href="https://github.com/ncruces"><code>@ncruces</code></a>, others were involved in review and design. This was made easier because Nuno kept excellent notes and comments, as well made <a href="https://github.com/ncruces/go-sqlite3/tree/main/vfs/tests/speedtest1">speedtest1</a> to test results. <a href="https://github.com/achille-roussel"><code>@achille-roussel</code></a> and <a href="https://github.com/mathetake"><code>@mathetake</code></a> contributed feedback and <a href="https://github.com/evacchi"><code>@evacchi</code></a> ported the implementation over to arm64 a lot easier due to the rigor involved.</p> <p>The end results are really quite excellent, especially as debug info is rarely used in release builds. For example, an unrelated project <a href="https://github.com/kubernetes-sigs/kube-scheduler-wasm-extension">kube-scheduler-wasm-extension</a> performance improved with real data, up to 6.5%, with no other changes except upgrading to the latest patch.</p> <h3>Note on TinyGo v0.28.1</h3> <p>We updated our TinyGo examples to v0.28.1, which supports more features (such as ReadDir and json), and more idiomatic wasm import signatures. A lot went into this release, so please thank the TinyGo team with a <a href="https://github.com/tinygo-org/tinygo/stargazers">star</a>!</p> <pre lang="diff"><code>- //go:wasm-module env - //export log + //go:wasmimport env log func _log(ptr, size uint32) </code></pre> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tetratelabs/wazero/commit/b01ba67fdcf32997d22a0f56b723a71c1c40cd75"><code>b01ba67</code></a> wasi: add nonblock_test.go from gotip, fix nonblock read on Unix-like (<a href="https://redirect.github.com/tetratelabs/wazero/issues/1517">#1517</a>)</li> <li><a href="https://github.com/tetratelabs/wazero/commit/f38587323952b89b57afe24062bb2638c302c886"><code>f385873</code></a> compiler(arm64): generate trap exit code once (<a href="https://redirect.github.com/tetratelabs/wazero/issues/1516">#1516</a>)</li> <li><a href="https://github.com/tetratelabs/wazero/commit/26eae5756c6ad7991f22776a7b7d11000b3e441b"><code>26eae57</code></a> compiler(amd64): generate exit code once (<a href="https://redirect.github.com/tetratelabs/wazero/issues/1515">#1515</a>)</li> <li><a href="https://github.com/tetratelabs/wazero/commit/e3755ce4af832a89e8557a5607bab2ab5df496bc"><code>e3755ce</code></a> compiler(amd64): avoid unnecessary jump in signed remainder (<a href="https://redirect.github.com/tetratelabs/wazero/issues/1514">#1514</a>)</li> <li><a href="https://github.com/tetratelabs/wazero/commit/f3778cae0856d65a41af25fa37eea6cf5e62aa8c"><code>f3778ca</code></a> wasi: fix nonblocking sockets on *NIX (gotip net/http) (<a href="https://redirect.github.com/tetratelabs/wazero/issues/1503">#1503</a>)</li> <li><a href="https://github.com/tetratelabs/wazero/commit/b4d97e5e69998ef56b4ae0ba12ea923cb90431b3"><code>b4d97e5</code></a> compiler(amd64): emit smaller instructions (<a href="https://redirect.github.com/tetratelabs/wazero/issues/1513">#1513</a>)</li> <li><a href="https://github.com/tetratelabs/wazero/commit/1e0f88bc1462ca07a33df83004914d3af7f5bcb4"><code>1e0f88b</code></a> deps: upgrades to TinyGo v0.28.1 (<a href="https://redirect.github.com/tetratelabs/wazero/issues/1512">#1512</a>)</li> <li><a href="https://github.com/tetratelabs/wazero/commit/904e9a99723a2252cb596db4127ecdc431aa06f0"><code>904e9a9</code></a> site: add wasi-go to the list of community projects (<a href="https://redirect.github.com/tetratelabs/wazero/issues/1511">#1511</a>)</li> <li><a href="https://github.com/tetratelabs/wazero/commit/7d60e1a7393c256574f58fd36d7eb175c013c0a3"><code>7d60e1a</code></a> site: add wzprof to the list of community projects (<a href="https://redirect.github.com/tetratelabs/wazero/issues/1510">#1510</a>)</li> <li><a href="https://github.com/tetratelabs/wazero/commit/390437e1fe99c852f3ec7d239fda81e027f90428"><code>390437e</code></a> Revert "wip"</li> <li>Additional commits viewable in <a href="https://github.com/tetratelabs/wazero/compare/v1.2.0...v1.2.1">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) 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-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> 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) </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
