2019-08-06 16:03:11 +03:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
|
|
|
|
wasmgo "github.com/vedhavyas/wasm"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2019-08-13 18:11:23 +03:00
|
|
|
b := wasmgo.Bridge{}
|
|
|
|
err := b.InitWASM("test", "./simple/prog/main.wasm", nil)
|
2019-08-06 16:03:11 +03:00
|
|
|
if err != nil {
|
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
|
2019-08-13 18:11:23 +03:00
|
|
|
if err := b.Run(); err != nil {
|
2019-08-06 16:03:11 +03:00
|
|
|
log.Fatal(err)
|
|
|
|
}
|
|
|
|
}
|