Skip to content

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github Jan 3, 2023

Bumps github.com/tetratelabs/wazero from 1.0.0-pre.4 to 1.0.0-pre.7.

Release notes

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

wazero v1.0.0-pre.7 fixes a compilation problem affecting those building GOARCH=386. Other users can skip this version.

wazero v1.0.0-pre.6 improves performance, CLI and adds a writeable filesystem.

Performance, reliability and usability have been recurring trends in wazero this year, and they will continue into next. We're thankful to have so many end users and enthusiasts active, and wow.. it was an active month!

Performance

This December, @​mathetake has been working hard on the compiler backend, while @​ckaznocha put in time to optimize various parts of module initialization. We've also put many more benchmarks in place including I/O functions like WASI. Results were dramatic.

For example, our benchmark of go compiled to wasm (GOOS=js GOARCH=wasm) improved almost 25%, while our benchmark for WASI+TinyGo improved compilation time by almost 25% and instantiation time nearly 10%.

While these improvements are great, wazero still won't beat optimizing compilers. The good news is that @​mathetake proved it is possible to do JIT-ish compilation and execution in pure Go. Moreover, Tetrate has hired an extremely bright engineer to start working with Takeshi on this problem next month. For those interested in how wazero works today, take a look at this year's GopherCon presentation.

CLI

wazero works with diverse wasm compilers. Many re-use the same libraries to perform tasks such as I/O, like wasi-libc. However, even those who use that routinely drop down to pure wasm functions to optimize or decouple. Moreover, Go's compiler uses its own syscall ABI which is unlike WASI. In order for us to be more efficient, we've significantly enhanced our CLI.

Most notably, we added --hostlogging=filesystem which can show you what's happening during a command.

$ tinygo build -target wasi -o cat.wasm cat.go
$ echo hello world > /tmp/hello.txt
$ wazero run -mount=/tmp:/ --hostlogging=filesystem cat.wasm /hello.txt
==> wasi_snapshot_preview1.fd_prestat_get(fd=3)
<== (prestat={pr_name_len=1},errno=ESUCCESS)
--snip--

We also detect if you are using Go generated wasm automatically now (GOOS=js GOARCH=wasm). We support logging on that, even though the functions underneath act wildly differently.

$ GOARCH=wasm GOOS=js go build -o cat.wasm cat.go
$ wazero run -mount=/tmp:/ --hostlogging=filesystem cat.wasm /hello.txt
==> go.syscall/js.valueCall(fs.open(name=/hello.txt,flags=,perm=----------))
<== (err=<nil>,fd=4)
--snip--

We've also added a -cachedir flag which allows running the same wasm faster the second time. Those building images can use the compile command first, as that allows you to build cache without actually executing the module.

Ex. This command took almost 140ms as it implied compilation. By precompiling, it executes 100ms quicker.

$ time wazero run -mount=/tmp:/ cat.wasm /hello.txt
hello world
real	0m0.139s
user	0m0.178s
sys	0m0.036s
</tr></table>

... (truncated)

Commits
  • 4197caa Ensures 32-bit platforms build (#996)
  • 94491fe Implements rename in GOOS=js and WASI (#991)
  • e4740ef site: updates wasi support table (#993)
  • 2fbf83e wasi: fixes or'd open flags (#990)
  • c9868d8 Removes internal dependency on fs.FS (#987)
  • 2045f71 enginetest: fixes panic om memory def (#989)
  • da3aa7a Adds ExportedFunctionDefinitions and ExportedMemoryDefinitions (#986)
  • e7018d1 compiler: force moduleContext initialization after Go function calls (#988)
  • efc72de gojs: implements timeout events (#984)
  • 67cc6d3 compilationcache: uses version-specific subdirectory (#982)
  • 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 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.0.0-pre.4 to 1.0.0-pre.7.
- [Release notes](https://github.com/tetratelabs/wazero/releases)
- [Commits](wazero/wazero@v1.0.0-pre.4...v1.0.0-pre.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Jan 3, 2023
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Feb 1, 2023

Superseded by #222.

@dependabot dependabot bot closed this Feb 1, 2023
@dependabot dependabot bot deleted the dependabot/go_modules/sdks/github.com/tetratelabs/wazero-1.0.0-pre.7 branch February 1, 2023 14:17
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 Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant