README.md
June 2, 2026 ยท View on GitHub
This is a tool to convert a Go application to a WebAssembly component. It takes the following as input:
- a WIT file or directory
- the name of a WIT world defined in the above file or directory
- the directory containing a Go module which targets said world
The output is a component which may be run using e.g. wasmtime.
Installation
Using Go
Requires Go 1.25.5+
Add the following to your go.mod file and run go mod tidy:
tool github.com/bytecodealliance/componentize-go
In the same directory as your go.mod file, you can interact with the tool:
go tool componentize-go --help
Alternatively:
go install github.com/bytecodealliance/componentize-go@latest
It should be accessible via PATH:
componentize-go --help
Download a release
You can download a specific release from the release page.
Build from source
Prerequisites
- Rust toolchain - Latest version
Run
cargo install --git https://github.com/bytecodealliance/componentize-go
Usage
Please reference the README.md and Makefile files in each of the directories in examples.