We are currently building a library with 50 other libraries, and need expose over a thousand functions. With fastcomp backend, we currently create a shared lib with all these libs, and another shared lib worker.so which was linked against the previous shared lib. We then create WebAssembly binaries with these two shared libraries.
When trying to use the latest upstream backend, we encountered this issue
https://github.com/emscripten-core/emscripten/issues/9726 for creating the shared libs. We then tried to create WebAssembly binaries with static libs. First difficulty is that we need to list all the 50 static lib names in the cmake file, and we also need list all the 2000 functions for EXPORTED_FUNCTIONS because EMSCRIPTEN_KEEPALIVE doesn't keep the functions alive.
Is there an equivalent of EMSCRIPTEN_KEEPALIVE for static libraries or a way to make it work with them? Is there any alternative approach to group the libraries, so that we don't need to list all the libraries and functions?
Thanks in advance for any suggestions,
Dan