Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

[ux] WASI #117

Open
modulovalue opened this issue Nov 22, 2022 · 0 comments
Open

[ux] WASI #117

modulovalue opened this issue Nov 22, 2022 · 0 comments

Comments

@modulovalue
Copy link
Contributor

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

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant