2 ms·
It's not Rust and TS, instead C and JS, but Emscripten has a very nice way of integrating C/C++ and JS (you can just embed snippets of Javascript inside C/C++ s
by flohofwoe 4y ago
It's not Rust and TS, instead C and JS, but Emscripten has a very nice way of integrating C/C++ and JS (you can just embed snippets of Javascript inside C/C++ source files), e.g. starting at this line, there's a couple of embedded Javascript functions which can be called like C functions directly from the "C side":
https://github.com/floooh/sokol/blob/4535a3b4be59eb912e77e04a8255920deec67b4d/sokol_audio.h#L1802 https://github.com/floooh/sokol/blob/4535a3b4be59eb912e77e04...