Skip to content

Another wasm interpreter engine for gophers based on pure golang

License

Notifications You must be signed in to change notification settings

hybridgroup/wasman

 
 

Repository files navigation

WASMan (WebAssembly Manager)

Go Report Card Go

Another wasm interpreter engine for gophers.

This is a substantially modified fork of https://github.com/c0mm4nd/wasman by way of https://github.com/orsinium-forks/wasman for the purpose of major bugfixing.

Usage

Executable

Install

go install github.com/hybridgroup/wasman/cmd/wasman
$ 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

$ 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.

$ wasman -main numeric.wasm -max-toll 300000 -func fib 20
panic: toll overflow

goroutine 1 [running]:
main.main()
        /home/ubuntu/Desktop/wasman/cmd/wasman/main.go:85 +0x87d

Go Embedding

PkgGoDev

Example

Look for examples?

They are in examples folder

TODOs

  • add more complex examples

About

Another wasm interpreter engine for gophers based on pure golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%