01-11-2023, 01:46 AM
(01-11-2023, 12:52 AM)megamarc Wrote: Hi!
Sorry for the delay, I've been out offline on Christmas holidays.
I don't quite know emscripten to answer this question right now. The setup I have first compiles a static library libTilengine.a composed of webassembly (wasm) objects, and then builds a final wasm bundling the library, the compiled sample and packaged assets.
I know that emscripten can compile to plain asm.js instead of wasm. So in theory this intermediate library in asm.js should be usable inside a native javascript application. But as I mentioned, I don't know enough the toolchain and its possible output paths. I just learned how to build the original samples written in C. But it'ssomething that should be explored.
This documentation page talks about calling C code in a library (i.e Tilengine) from javascript code:
https://emscripten.org/docs/porting/conn...call-cwrap
Hi!
I hope your Christmas holidays were good.
being able to call C code from JS sounds interesting. Modern web technologies are powerful today, so I think there are many options.
I can eventually try to compile and test on my side too, but I should figure out how to compile to WASM first (I often struggle to compile C / C++, I often have many errors. Hello to the "Undefined Reference to SDL2_..." errors)