Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/c0mm4nd/wasman
Another wasm interpreter engine for gophers based on pure golang
https://github.com/c0mm4nd/wasman
gophers smart-contract-platform wasm wasm-interpreter-engine wasm-runtime
Last synced: 19 days ago
JSON representation
Another wasm interpreter engine for gophers based on pure golang
- Host: GitHub
- URL: https://github.com/c0mm4nd/wasman
- Owner: c0mm4nd
- License: mit
- Created: 2020-09-05T06:09:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-22T07:41:08.000Z (over 2 years ago)
- Last Synced: 2024-11-29T17:49:52.943Z (24 days ago)
- Topics: gophers, smart-contract-platform, wasm, wasm-interpreter-engine, wasm-runtime
- Language: Go
- Homepage:
- Size: 295 KB
- Stars: 10
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# WASMan (WebAssembly Manager)
[![](https://godoc.org/github.com/c0mm4nd/wasman?status.svg)](http://godoc.org/github.com/c0mm4nd/wasman)
[![Go Report Card](https://goreportcard.com/badge/github.com/c0mm4nd/wasman)](https://goreportcard.com/report/github.com/c0mm4nd/wasman)
![CI](https://github.com/c0mm4nd/wasman/workflows/CI/badge.svg)Another wasm interpreter engine for gophers.
## Usage
### Executable
Install
```bash
go install github.com/c0mm4nd/wasman/cmd/wasman
``````bash
$ wasman -h
Usage of ./wasman:
-extern-files string
external modules files
-func string
main func (default "main")
-main string
main module (default "module.wasm")
-max-toll uint
the maximum toll in simple toll station
```Example: [numeric.wasm](https://github.com/C0MM4ND/minimum-wasm-rs/releases/latest)
```bash
$ wasman -main numeric.wasm -func fib 20 # calc the fibonacci number
{
type: i32
result: 6765
toll: 315822
}
```If we limit the max toll, it will panic when overflow.
```bash
$ wasman -main numeric.wasm -max-toll 300000 -func fib 20
panic: toll overflowgoroutine 1 [running]:
main.main()
/home/ubuntu/Desktop/wasman/cmd/wasman/main.go:85 +0x87d
```### Go Embedding
[![PkgGoDev](https://pkg.go.dev/badge/github.com/c0mm4nd/wasman)](https://pkg.go.dev/github.com/c0mm4nd/wasman)
#### Example
*Look for examples?*
They are in [examples folder](./examples)
## TODOs
- add more complex examples