rust emscripten + threads, can this work? #18156
dobkeratops
started this conversation in
General
Replies: 1 comment 2 replies
-
I expect this might not work, since as you said it's not commonly used. But what error did you run into? Perhaps it's something fixable. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
emscripten is less popular in the rust community , but I use it because I like the common base between C++ and Rust of SDL2 and OpenGL bindings.
I was unfortunately unable to get threads working in this configuration .
Any idea why this might be ?
There will be multiple C++ successor languages (carbon, Zig, JAI for gamedev) and of course C++ - I support continuing with C FFI interfaces which is why I have preferred to stick with Emscripten for my rust WASM project.
This comes from my '.cargo/config.toml' which specifies command line arguments passed to rustc during rusts build process. e.g .-"C" means the next string is passed as a sommandline arg. "link-arg" in turn specifies what is passed to the linker
The commented out parts show how I was attempting to get threads working.
Other switches like 'USE_SDL=2", worked fine.
Beta Was this translation helpful? Give feedback.
All reactions