An open API service indexing awesome lists of open source software.

https://github.com/bytecodealliance/componentize-go

A tool that creates Go WebAssembly components.
https://github.com/bytecodealliance/componentize-go

Last synced: 20 days ago
JSON representation

A tool that creates Go WebAssembly components.

Awesome Lists containing this project

README

          


componentize-go


Build WebAssembly components with Go

A Bytecode Alliance project


build status


This is a tool to convert a Go application to a [WebAssembly component](https://github.com/WebAssembly/component-model). It takes the following as input:

- a [WIT](https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md) file or directory
- the name of a [WIT world](https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md#wit-worlds) 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`](https://github.com/bytecodealliance/wasmtime).

## Installation

### Download a release

You can download a specific release from the [release page](https://github.com/bytecodealliance/componentize-go/releases).

### Build from source

#### Prerequisites

- [**Rust toolchain**](https://rust-lang.org/) - Latest version

#### Run

```sh
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](./examples/).