-
-
Notifications
You must be signed in to change notification settings - Fork 613
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
Modify core.stdc.stdlib.d is missing some type definitions for wasm32-unknown-unknown-wasm target #4673 #16535
Conversation
Thanks for your pull request and interest in making D better, @Sticky-fingerz! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#16535" |
WebAssembly doesn't define these C types or |
In fact, I don't really understand,but I wanted to develop wasm game with raylib and dlang.
This approach seems to be working in my game. |
By the way,I didn't realize it until you mentioned it. |
Yes, emscripten provides a C runtime with the right JavaScript hooks IIRC
While I do wish D supported WebAssembly better out of the box, I don't think this PR is correct, so I'll close it. |
@Sticky-fingerz Note |
I tried the above commit with changeing version(WebAssembly) → version(Emscripten) and build with |
@kassane Can you give a hand here? :) thanks! @Sticky-fingerz |
Hi @Sticky-fingerz, WiP ldc2-1.39/2.109.0: You could also try using References |
@JohanEngelen I understood.thanks. |
When import core.stdc.stdlib.d (for example,to use malloc) in wasm project and build next command
these errors ocuured.
These problems solved by adding type definitions to the three files (config.d,stddef.d,stdlib.d) in the binary directory(ldc\import\core\stdc).
config.d
stddef.d
stdlib.d