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
I am having a hard time trying to resolve this issue. I built my standalone wasm by compiling my C file and then used emcc to link. Everything built fine, but at runtime within my python server I get this error:
Clearly there are two imports that are not being resolved at load time. From what I can gather these are being used in a layer below my code and they are coming from some Rust code somewhere. I've tried everything so many things from trying to figure out what I need to link, to playing with emcc parameters and flags, to trying to bulld with older versions of emsdk. I've seen other people have the same issue, but nowhere can I find what the actual solution is to fixing this and getting my wasm to load cleanly at runtime.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am having a hard time trying to resolve this issue. I built my standalone wasm by compiling my C file and then used emcc to link. Everything built fine, but at runtime within my python server I get this error:
RuntimeError: Error while importing "wasi_snapshot_preview1"."proc_exit": unknown import. Expected Function(FunctionType { params: [I32], results: [] })
I used wasmer to load the wasm in python environment. Here is the wasmer inspect output from my wasm file:
$ ~/.wasmer/bin/wasmer inspect module/standalone/fingerprint-standalone.wasm
Type: wasm
Size: 17.3 KB
Imports:
Functions:
"wasi_snapshot_preview1"."fd_write": [I32, I32, I32, I32] -> [I32]
"wasi_snapshot_preview1"."proc_exit": [I32] -> []
Memories:
Tables:
Globals:
Exports:
Functions:
"fingerprint_jpg": [I32, I32, I32, I32] -> [I32]
"fingerprint_jpg_b64": [I32, I32, I32, I32] -> [I32]
"fingerprint_data": [I32, I32, I32, I32] -> [I32]
"fingerprint_data_start": [I32] -> [I32]
"fingerprint_data_update": [I32, I32, I32] -> [I32]
"fingerprint_data_final": [I32, I32, I32] -> [I32]
"fingerprint_context_size": [] -> [I32]
"get_version_str": [I32] -> [I32]
"_start": [] -> []
Memories:
"memory": not shared (4096 pages..4096 pages)
Tables:
Globals:
Clearly there are two imports that are not being resolved at load time. From what I can gather these are being used in a layer below my code and they are coming from some Rust code somewhere. I've tried everything so many things from trying to figure out what I need to link, to playing with emcc parameters and flags, to trying to bulld with older versions of emsdk. I've seen other people have the same issue, but nowhere can I find what the actual solution is to fixing this and getting my wasm to load cleanly at runtime.
Beta Was this translation helpful? Give feedback.
All reactions