-
Notifications
You must be signed in to change notification settings - Fork 76
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
Emscripten build #555
Comments
Sure, we can add a IIRC Also, you can try to use the latest tbb as it supports emscripten now. See #520 (comment) for the patch. We did not enable it right now because the emscripten worker file does not support modules yet. |
Why would you want to target Emscripten without the WASM bindings? What would your output be? |
Because I’m integrating manifold in a c++ code base. (By the way, there is now a collider.a, etc for every folder except of just a single manifold.a, not sure if done on purpose, bu I now need to link 5/6 lib in Xcode instead of a single one). |
No this is not on purpose. Can you show the output of
|
Oh, I see, so Manifold is part of a larger project that is also being compiled to WASM. Makes sense. @pca006132 I think you're showing exactly what he's saying: separate .a files for each folder, rather than one top-level, right? We do intentionally separate the library in case you just want pieces of it. Still, maybe making a bundled version would also be useful? PRs welcome, but we do need to consider how much testing any additional permutations would require. |
hmmm, I consider each directory to be a package of its own, so the current behavior is the correct behavior. I did not check, but I think the libmanifold.a file should contain the content of libcollider.a when it is built as a static library. |
We can bundle those libraries into a single dynamic library. E.g.
However, I don't know how to ask CMake to not generate those archive files. I don't think they matter anyway as we don't have to distribute them. |
To clarify, the behaviour changed because OBJECT has been removed when adding the library, e.g: |
OK I checked, OBJECT will mess up shared library builds. There are ways to get around this but I don't think it is worth the hassle. |
Can we add an option to skip the wasm bindings when targeting EMSCRIPTEN? Or an option to skip the nixos thing.
For my wasm integration I used to do something like:
But now the build fails because of nixos thing:
manifold/CMakeLists.txt
Lines 63 to 65 in 5e10393
If EMSCRIPTEN is 1, then the wasm bindings fail (don't really want to investigate why, as I don't use it)
Other tiny question: Is
D_LIBCUDACXX_HAS_THREAD_API_CUDA
doing something for wasm?The text was updated successfully, but these errors were encountered: