Rust + OpenCV (C++ code) + WebAssembly

Hello all, this is my first post here, and I'm not sure if this is the correct place to ask, so if it's not - please point me in the right direction :slightly_smiling_face:

My problem, in short, is that I want to use Rust with OpenCV (a C++ library capable of building to Wasm) and with WebAssembly target.

I'm new to Rust and Wasm. I did some research on Wasm already, and from what I learned, there's currently no standard way to (statically) link two different Wasm modules (other than using binaryen merge tool? would that work?), so the only possibility of making this work (that comes to my mind) would be to rip the OpenCV build script apart and somehow connect it with cargo build of the Wasm module (or maybe I should try emscripten and dynamic linking?) However, I'm not even sure I'm capable of doing this and how long it would take me to do it, so I decided first to ask if there's an easier way? Did anyone succeed in doing something similar that I could take as an inspiration?

Any kind of hint would be greatly appreciated! :slightly_smiling_face:

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.