func (b *Bridge) Run() error {
	defer b.instance.Close()
	start := b.instance.Exports["_start"]
	_, err := start()
	if err != nil {
		log.Println(wasmer.GetLastError())
		return err
	}
	sigChan := make(chan os.Signal, 1)
	signal.Notify(sigChan,
		syscall.SIGHUP,
		syscall.SIGINT,
		syscall.SIGTERM,
		syscall.SIGQUIT)
	go func() {
		s := <-sigChan
		b.exitCode = s
	}()
	fmt.Printf("WASM exited with code: %v\n", b.exitCode)
	return nil
}
// Run start the wasm instance.
Run start the wasm instance.
// Run start the wasm instance .
func (b *Bridge) Run() error {
	defer b.instance.Close()
	start := b.instance.Exports["_start"]
	_, err := start()
	if err != nil {
		log.Println(wasmer.GetLastError())
		return err
	}
	sigChan := make(chan os.Signal, 1)
	signal.Notify(sigChan,
		syscall.SIGHUP,
		syscall.SIGINT,
		syscall.SIGTERM,
		syscall.SIGQUIT)
	go func() {
		s := <-sigChan
		b.exitCode = s
	}()
	fmt.Printf("WASM exited with code: %v\n", b.exitCode)
	return nil
}
func ( b * Bridge ) Run ( ) error { defer b . instance . Close ( ) start := b . instance . Exports [ " " ] _ , err := start ( ) if err != nil { log . Println ( wasmer . GetLastError ( ) ) return err } sigChan := make ( chan os . Signal , 1 ) signal . Notify ( sigChan , syscall . SIGHUP , syscall . SIGINT , syscall . SIGTERM , syscall . SIGQUIT ) go func ( ) { s := <- sigChan b . exitCode = s } ( ) fmt . Printf ( " \n " , b . exitCode ) return nil }
Run start the wasm instance.
Run start the wasm instance .