Help regarding setup of wasm32-unknown-emscripten static library that can be linked to a cpp project. #6979
Unanswered
nnstanusic
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Unless someone from the community has advice, none of us use the emscripten backend ourselves and emscripten exposes webgl through emulating real gles3, which is a lot going on, so we won't really be able to help much. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello and thank you for taking the time,
I'm attempting to create a small cross platform rendering static library using Rust and wgpu. The library would then be linked i into an existing C++. The API of the lib is just a Init and Render function hidden behind extern "C" for now.
So far, I've managed to make it work on Windows with SDL where I pass the HWND through raw_window_handle. 💪
When calling the generated emscripten wasm. During creation of the wgpu::Instance i get an error that no backend could be found.
I haven't reached creation of a surface linking it to a canvas yet.
Currently the whole static library is just the learn wgpu sample and the error happens here:
No backend could be found.
Does anybody have any advice on how to proceed?
This is the content of my Cargo.toml for now.
CMakeLists.txt for linking into emscripten
Beta Was this translation helpful? Give feedback.
All reactions