6 ms·
I‘m curious: How does Zyn integrate with non-Zyn-style projects? I.e. I have CMake/whatever project X that just tries to find dependencies and lists them in som
by tos1 1y ago
I‘m curious: How does Zyn integrate with non-Zyn-style projects? I.e. I have CMake/whatever project X that just tries to find dependencies and lists them in some readme to be manually installed by the user (I think that applies to most C/C++ projects out there).
And now, I am listing X as a dependency in Zyn. How does it deal with this situation?
- zyntraxis 1y agoZyn can integrate with non-Zyn-style projects (like CMake or Make-based ones), but it treats them as opaque third-party dependencies and handles them externally. Here's how it works: Cloning: When you list a Git-based dependency like https://github.com/user/X https://github.com/user/X in your zyn.toml, Zyn clones it into .zyn/deps. Build Detection: Zyn looks for known build systems (CMakeLists.txt, Makefile, etc.) in the dependency. If found, Zyn runs the appropriate commands (cmake, make, etc.) to build the project. Dependency Isolation: Zyn does not parse or resolve the internal dependency graph of project X. If X needs other libraries (Y, Z, etc.), you must also list those manually in your own zyn.toml. This gives you full control and reproducibility. Header and Library Exposure: After building, Zyn makes the compiled .a/.so/.lib and headers available to your main project automatically by linking them via -I and -L flags. Example: Let’s say project X depends on Y and Z, but doesn’t use Zyn itself and just mentions this in a README. You’d do: [dependencies] X = "https://github.com/user/X https://github.com/user/X" Y = "https://github.com/user/Y https://github.com/user/Y" Z = "https://github.com/user/Z https://github.com/user/Z" Zyn will fetch and build all of them. It doesn’t care that X has no zyn.toml.