-
Notifications
You must be signed in to change notification settings - Fork 106
Added initial support for emscripten clang compilers #70
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Novice Arts LLC <noviceartsstudios@gmail.com>
|
Not sure this is the correct approach. It seems that the Also |
|
I agree with your suggestion about the It seems like the big change is the section label, as that had new syntax I have not seen in any other assembler. As well, emscripten requires incbin to be restricted to the I can fix |
|
so I double checked your suggestion about the |
Signed-off-by: Novice Arts LLC <noviceartsstudios@gmail.com>
|
I'm working on a project that would potentially benefit from "incbin" WASM support. Any chance of getting WASM support merged in the near future? |
… as of 2025-10-23. Add associated test code to verify WASM compatibility.
…ing on top of main as of 2025-10-23

This PR includes necessary changes to get the incbin header file working on emscripten platforms.
The changes made here are based on the following code snippet: https://github.com/dotnet/runtimelab/blob/889ad1337ac28740a97cc60fa6126654e59de73c/src/native/libs/System.Globalization.Native/icu_data_lib.c#L8-L18
I learned about this from discussing with folks on the WebAssembly discord server. Presently the
.sizemarker holds a fixed size amount of4in the common macro, which may pose a problem for wasm64, but I believe should be fine for wasm32. Otherwise from tests on my machine I've experienced near identical behavior switching from PC to web targets of my code.I tested this on a windows 8 machine using clang for both PC and Web. I dont have access to other machines/OSes to test the changes with. In the worst case scenario this cant be merged, I hope it serves as a useful reference for anyone else wanting to integrate with emscripten.