wasm_run icon indicating copy to clipboard operation
wasm_run copied to clipboard

Flutter: error "cannot find definition for import wasi_snapshot_preview1"

Open jvinai opened this issue 8 months ago • 0 comments

Hi!

Im making a flutter app that will use a wasm file that uses wasi1 and when i try to use wasm_run_flutter i get this error:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FrbAnyhowException(cannot find definition for import wasi_snapshot_preview1::sched_yield with type Func(FuncType { params: [], results: [I32] }))

It seems it doesnt have wasi1 defintion included. The code i use is your example code and i load the wasm binary instead of your inline base64 wasm code. https://github.com/juancastillo0/wasm_run/blob/main/packages/wasm_run_flutter/example/lib/main.dart

Thank you.

jvinai avatar Jun 27 '24 01:06 jvinai