cloudflare / cloudflare/workers-rs
thirdparty .wasm usage from C
- Dominant language
- Rust
- Stars
- 3.7k
- Forks
- 429
- Avg merge
- 20h 28m
- Merged PRs (30d)
- 7
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### 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: https://github.com/rustwasm/wasm-bindgen/pull/2209
I tried to reuse solutions, but got an exceptions:
```
Added lib like this: rbg_calculator = { path = "../test-c-rust-wasm/crates/5_rust_bindgen" }
But CloudFlare worker fails: service core:user:memgraph: Uncaught TypeError: WebAssembly.Instance(): Import #6 "env": module is not an object or function
```
Final goal is to add this one: https://github.com/memgraph/mgclient
It has an ability to be compiled in wasm:
```
Building WASM (Linux only)
Compiling mgclient for wasm requires the Emscripten sdk. This is automated in the following steps:
mkdir build && cd build
cmake .. -DWASM=ON
```
I also tried it, but the same error
Any suggestion on this?
Contributor guide
Assessment
This issue has not been assessed yet.