WasmRuntimeError: Failed to fill WASI imports.
Failed to resolve import "env" "exit"
#0 WasmRuntime._checkNotEqual (package:wasm/src/runtime.dart:384:7)
#1 WasmRuntime.getWasiImports (package:wasm/src/runtime.dart:360:5)
#2 _WasmInstanceBuilder.enableWasi (package:wasm/src/module.dart:210:13)
To be honest, I'm not entirely sure how WASI is supposed to work.
As far as I understood it, it's a known set of imports that WASM modules can choose to depend on? So if a module expects a particular set of imports, can we then derive that it depends on WASI? We should perhaps provide some help here or at least a little more information about what actually went wrong.
I'm trying to bind some WASM modules, and here is one error that is extremely confusing from the perspective of a user:
https://github.com/dart-lang/wasm/blob/ddb2d46ac000827f44a3d18c6564b13b8b3876ef/wasm/lib/src/runtime.dart#L355-L365
To be honest, I'm not entirely sure how WASI is supposed to work. As far as I understood it, it's a known set of imports that WASM modules can choose to depend on? So if a module expects a particular set of imports, can we then derive that it depends on WASI? We should perhaps provide some help here or at least a little more information about what actually went wrong.