-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
thirdparty .wasm usage from C #616
Comments
It fails directly there - var B = new WebAssembly.Instance(N, { "./index_bg.js": g }); |
My understanding is that workers-rs just compiles to wasm32-unknown-unknown and that poses some limitations. But under the hood, the plain wasm file is loaded by the engine and you can use that, to access some additional support that might be present: And apparently there is a way to get emscripten to work (it seems required by your final goal in wasm) |
These errors seem to be originating from the JavaScript shim that we auto-generate for you. Can you share a full reproduction repository? |
Seems C static library was incorrect. Just bindings are not present. I asked on there repository, have no answer. One question: Can I use thirdparty .wasm from Rust on CF? Any suggestion to use from wasm? Tried to load/embed using wasm_bingen, but got an error Then if there any way to run thirdparty wasm? |
@aviplayer, sorry for my late answer; I was on vacation and didn't see your message. This issue arises because C symbols are not exported to a In the case of WASM, all missing symbols are expected to be provided from the In my example, the This was my first iteration for a POC and quite a hack-ish approach. In production, I'm using I will update the examples later on. |
Is there an existing issue for this?
Description
Are there any ability to use C compiled code?
I noticed nightly build provide an ability to compile/link C code
example: https://github.com/rafaelbeckel/test-c-rust-wasm
discussion: rustwasm/wasm-bindgen#2209
I tried to reuse solutions, but got an exceptions:
Final goal is to add this one: https://github.com/memgraph/mgclient
It has an ability to be compiled in wasm:
I also tried it, but the same error
Any suggestion on this?
The text was updated successfully, but these errors were encountered: