Closed mirecl closed 2 years ago
The interpreter could be very slow. So you do need AOT in order to get near native performance.
Can you add a print statement in main() and see if the AOT compiled Wasm file can run in the WasmEdge CLI? Thanks.
@juntao Command: wasmedge --reactor fib.wasm Fibonacci 10 Respоnse: zsh: bus error wasmedge --reactor fib.wasm Fibonacci 10
It's a known issue on MacOS 12. We are working for the bus error issue of AOT mode on Monterey now. So in the current state, maybe you can use the Linux platforms for the better supporting for WasmEdge-go. Thanks.
Please refer to the issues: https://github.com/WasmEdge/WasmEdge/issues/1426 https://github.com/WasmEdge/WasmEdge/issues/1435
Fixed this issue in this PR: https://github.com/WasmEdge/WasmEdge/pull/1589
Please use WasmEdge-go 0.10.1-alpha.2 or later versions. Thanks.
1. My OS: Mac OS Monterey (version 12.0.1) 2. Go version: 1.17.6 3. Tinygo: tinygo version 0.22.0 darwin/amd64 (using go version go1.17.6 and LLVM version 13.0.0) 4. My func for WASM:
Command compile: tinygo build -o fib.wasm -target wasi fib.go 5. My main app:
6. Performance Comparison:
❓Why slow:(?
7. AOT Compile: wasmedgec fib.wasm fib.wasm 8. Run app again:
HELP ME:) ❓what am I doing wrong?