https://github.com/tx7do/test-go-wasm
https://github.com/tx7do/test-go-wasm
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/tx7do/test-go-wasm
- Owner: tx7do
- License: mit
- Created: 2023-10-30T10:47:54.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-30T20:20:18.000Z (over 2 years ago)
- Last Synced: 2025-01-02T05:32:00.344Z (over 1 year ago)
- Language: Go
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# test-go-wasm
## Installing wasmtime
[Installing wasmtime](https://docs.wasmtime.dev/cli-install.html#installing-wasmtime)
### Windows
```shell
scoop install wasmtime
```
### MacOS
```shell
brew install wasmtime
```
## Compile
### Linux
```shell
GOOS=wasip1 GOARCH=wasm go build -o main.wasm main.go
```
### Windows
```shell
SET CGO_ENABLED=0 ;`
SET GOOS=wasip1 ;`
SET GOARCH=wasm ;`
go build -o main.wasm main.go
```
go version
## Run
```shell
wasmtime main.wasm --default-encoding=utf-8
```