https://github.com/jcbhmr/hello-world-go-wasmer-cli
👨💻 Example CLI application built with Go and distributed via Wasmer
https://github.com/jcbhmr/hello-world-go-wasmer-cli
app cli go go-app golang wasi wasm wasmer webassembly
Last synced: 3 months ago
JSON representation
👨💻 Example CLI application built with Go and distributed via Wasmer
- Host: GitHub
- URL: https://github.com/jcbhmr/hello-world-go-wasmer-cli
- Owner: jcbhmr
- License: 0bsd
- Created: 2024-01-02T21:26:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-03T03:20:06.000Z (over 2 years ago)
- Last Synced: 2025-08-04T11:21:34.398Z (12 months ago)
- Topics: app, cli, go, go-app, golang, wasi, wasm, wasmer, webassembly
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# "Hello world!" Go Wasmer CLI
👨💻 Example CLI application built with Go and distributed via Wasmer
```sh
wasmer run jcbhmr/hello-world-go-wasmer-cli -- --name="Alan Turing"
#=> Hello Alan Turing!
```
🐿️ Written in Go \
🟪 Compiled to WebAssembly \
👨💻 Runnable on any device from a single `.wasm` binary \
🚛 Distributed via the [wasmer.io] registry
## Installation
There's nothing to install! [The Wasmer CLI] doesn't (yet) offer a first-class
way to `wasmer install ` globally.
## Usage


```sh
wasmer run jcbhmr/hello-world-go-wasmer-cli -- --name="Alan Turing"
#=> Hello Alan Turing!
```
### Options
- **`--name`:** The name to put in the output message `Hello ${name}!`.
## Development


🎉 Go 1.21 supports WASI preview 1! Yay! 🥳 Make sure you have [installed the
latest version of the Go toolchain].
```sh
./just build
```
You can use [the Wasmer CLI] to run your compiled WASI WebAssembly binary.
```sh
wasmer run $WASMERFLAGS . -- --name="Ada Lovelace"
```
Each time a new GitHub release is released it gets `wasmer publish`-ed.
[installed the latest version of the Go toolchain]: https://go.dev/doc/install
[the wasmer cli]: https://docs.wasmer.io/install
[wasmer.io]: https://wasmer.io/