-
Notifications
You must be signed in to change notification settings - Fork 123
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
Compile error with wasm #495
Comments
As far as I know GLFW is an OpenGL library, but you can only use WebGL with WebAssembly. For WebGL wasm example, please see this: https://rustwasm.github.io/wasm-bindgen/examples/webgl.html |
I don't think you can compile rust + C bindings to wasm. there's an ABI issue and fixing it breaks backwards compatibility apparently. more info rustwasm/wasm-bindgen#2209 |
glfw + wasm-emscripten works with a small patch. deployed version -> https://coderedart.github.io/egui_glow_glfw_emscripten/ the patch to make glfw-rs compile on emscripten target -> #531 emscripten is using glfw 3.2, so we will obviously miss some methods like content scale or window hint string from glfw 3.3, but atleast the rest work fine. once the patch is merged, i think this issue can be closed. |
Removed unnecesary shared memory due to blockreduce using static defined shared memory
I am trying to build the minimal example from the readme to wasm. By default it tries to build glfw using cmake, and that doesn't seem to work properly in terms of cross-compiling:
Next I tried with
default-features = false
inCargo.toml
, and I get this error:The text was updated successfully, but these errors were encountered: