百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
W

wazero

> 编程语言
开源

wazero: 面向 Go 开发者的零依赖 WebAssembly 运行时

6.3K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

wazero: 面向 Go 开发者的零依赖 WebAssembly 运行时

wazero: the zero dependency WebAssembly runtime for Go developers

WebAssembly is a way to safely run code compiled in other languages. Runtimes execute WebAssembly Modules (Wasm), which are most often binaries with a .wasm extension.

wazero is a WebAssembly Core Specification 1.0 and 2.0 compliant runtime written in Go. It has zero dependencies, and doesn't rely on CGO. This means you can run applications in other languages and still keep cross compilation.

Import wazero and extend your Go application with code written in any language!

Example

The best way to learn wazero is by trying one of our examples. The most basic example extends a Go application with an addition function defined in WebAssembly.

Runtime

There are two runtime configurations supported in wazero: Compiler is default:

By default, ex wazero.NewRuntime(ctx), the Compiler is used if supported. You can also force the interpreter like so:

r := wazero.NewRuntimeWithConfig(ctx, wazero.NewRuntimeConfigInterpreter())

Interpreter

Interpreter is a naive interpreter-based implementation of Wasm virtual machine. Its implementation doesn't have any platform (GOARCH, GOOS) specific code, therefore interpreter can be used for any compilation target available for Go (such as riscv64).

Compiler

Compiler compiles WebAssembly modules into machine code ahead of time (AOT), during Runtime.CompileModule. This means your WebAssembly functions execute natively at runtime. Compiler is faster than Interpreter, often by order of magnitude (10x) or more. This is done without host-specific dependencies.

Conformance

Both runtimes pass WebAssembly Core 1.0 and 2.0 specification tests on supported platforms:

Runtime Usage amd64 arm64 others Interpreter wazero.NewRuntimeConfigInterpreter() ✅ ✅ ✅ Compiler wazero.NewRuntimeConfigCompiler() ✅ ✅ ❌

Support Policy

The below support policy focuses on compatibility concerns of those embedding wazero into their Go applications.

wazero

wazero's 1.0 release happened in March 2023, and is in use by many projects and production sites.

We offer an API stability promise with semantic versioning. In other words, we promise to not break any exported function signature without incrementing the major version. This does not mean no innovation: New features and behaviors happen with a minor version increment, e.g. 1.0.11 to 1.2.0. We also fix bugs or change internal details with a patch version, e.g. 1.0.0 to 1.0.1.

You can get the latest version of wazero like this.

go get github.com/tetratelabs/wazero@latest

Please give us a star if you end up using wazero!

Go

wazero has no dependencies except Go and x/sys, so the only source of conflict in your project's use of wazero is the Go version.

wazero follows the same version policy as Go's Release Policy: two versions. wazero will ensure these versions work and bugs are valid if there's an issue with a current Go version.

Platform

wazero has two runtime modes: Interpreter and Compiler. The only supported operating systems are ones we test, but that doesn't necessarily mean other operating system versions won't work.

We currently test Linux (Ubuntu and scratch), MacOS and Windows as packaged by GitHub Actions, as well as nested VMs running on Linux for FreeBSD, NetBSD, OpenBSD, DragonFly BSD, illumos and Solaris.

We also test cross compilation for many GOOS and GOARCH combinations.

  • Interpreter
    • Linux is tested on amd64, arm64 and riscv64.
    • Windows, FreeBSD, NetBSD, OpenBSD, DragonFly BSD, illumos and Solaris are tested only on amd64.
    • macOS is tested only on arm64.
  • Compiler
    • Linux is tested on amd64 and arm64.
    • Windows, FreeBSD, NetBSD, DragonFly BSD, illumos and Solaris are tested only on amd64.
    • macOS is tested only on arm64.

wazero has no dependencies and doesn't require CGO. This means it can also be embedded in an application that doesn't use an operating system. This is a main differentiator between wazero and alternatives.

We verify zero dependencies by running tests in Docker's scratch image. This approach ensures compatibility with any parent image.

macOS code-signing entitlements

If you're developing for macOS and need to code-sign your application, please read issue #2393.


wazero is a registered trademark of Tetrate.io, Inc. in the United States and/or other countries

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •Interpreter
  • •Linux is tested on amd64, arm64 and riscv64.
  • •Windows, FreeBSD, NetBSD, OpenBSD, DragonFly BSD, illumos and Solaris are
  • •macOS is tested only on arm64.
  • •Compiler
  • •Linux is tested on amd64 and arm64.
  • •Windows, FreeBSD, NetBSD, DragonFly BSD, illumos and Solaris are
  • •macOS is tested only on arm64.

> 标签

Goahead-of-timecompilergogolang

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言