You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for all the effort put into making this project!
I wanted to build ywasm and run it in Elixir with Wasmex, but have run into the following issue:
iex(2)>{:ok,pid}=Wasmex.start_link(%{bytes: bytes})**(MatchError)nomatchofrighthandsidevalue: {:error,"unknown import: `wbg::__wbindgen_object_drop_ref` has not been defined"}(stdlib5.2.3) erl_eval.erl:498: :erl_eval.expr/6iex:2: (file)
I figured out I can pass in imports and provided a stub for __wbindgen_object_drop_ref:
iex(2)>{:ok,pid}=Wasmex.start_link(%{bytes: bytes,imports: %{wbg: %{:'__wbindgen_object_drop_ref'=>{:fn,[:i32],[],fn_->:okend}}}})**(MatchError)nomatchofrighthandsidevalue: {:error,"unknown import: `wbg::__wbindgen_object_clone_ref` has not been defined"}(stdlib5.2.3) erl_eval.erl:498: :erl_eval.expr/6iex:2: (file)
And then a few others (__wbindgen_object_clone_ref, __wbindgen_is_undefined), but this leads me to conclude that I'm doing something wrong and these functions should actually be provided by another WASM module. What would be the next steps to get this running properly (i.e. a WASM module with a dependency on wasm_bindgen)? I'd be grateful for any pointers, including external reading material, if such exists.
The text was updated successfully, but these errors were encountered:
@erszcz yes, from errors, it appears your target wasm is dependent on imports that are missing.
Is your target module dependent on another wasm module(s) that provides the missing functions?
If so, you'll need to dynamically link those wasm modules so that you don't have to manually specify all missing imports.
We recently added support to dynamically link external modules. #596
Aha, perfect! Thank you for the pointer, @munjalpatel, I'll dig into that thread!
I'll close the issue, since it's not really a Wasmex problem that needs addressing.
Hi,
First of all, thanks for all the effort put into making this project!
I wanted to build ywasm and run it in Elixir with Wasmex, but have run into the following issue:
I figured out I can pass in imports and provided a stub for
__wbindgen_object_drop_ref
:And then a few others (
__wbindgen_object_clone_ref
,__wbindgen_is_undefined
), but this leads me to conclude that I'm doing something wrong and these functions should actually be provided by another WASM module. What would be the next steps to get this running properly (i.e. a WASM module with a dependency on wasm_bindgen)? I'd be grateful for any pointers, including external reading material, if such exists.The text was updated successfully, but these errors were encountered: