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
As you can see I'm using dynamic host function registration. I found the description of how to do it here.
So now when I try to run it I'm getting following error:
I found the solution.
Originally I was following recommendation at the bottom of this page to use #[link_name = "namespace"] attribute to specify function's namespace. But according to this example I have to use #[link(wasm_import_module = "namespace")] attribute to do that.
Summary
I'm trying to instantiate a wasm file built from Rust source but getting error about namespaces.
Additional details
So here is a simple Wasm source:
and host:
As you can see I'm using dynamic host function registration. I found the description of how to do it here.
So now when I try to run it I'm getting following error:
thread 'main' panicked at 'failed to instantiate wasm module: LinkError([ImportNotFound { namespace: "env", name: "ns2" }, ImportNotFound { namespace: "env", name: "ns1" }])', src\main.rs:32:1
Am I misunderstand meaning of namespaces or I just use them in a wrong way?
The text was updated successfully, but these errors were encountered: