01-11-2023, 12:52 AM
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
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