Closed beatscode closed 5 years ago
It is possible to load a Wasm module representing a Go program, yes.
What code generates your error?
I ran composer to import "php-wasm/php-wasm": "^0.5.0"
when I try to run
$instance = new Wasm\Instance(__DIR__ . '/wasm.wasm');
var_dump(
$instance->multiply(5, 37)
);
I get the error described above.
The go code is the following
package main
func main(){
}
func multiply(x,y int) int {
return x * y;
}
I used tinygo to build maybe that is the issue?
/usr/local/tinygo build -o wasm.wasm -target wasm ./main.go
Did you include the vendor/autoload.php
?
My mistake, didn't compile extension properly
Summary
Is it possible to use this project to load a wasm file generated from golang?
Additional details
I tried but got