-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
add Zig build system #4516
add Zig build system #4516
Conversation
There are already multiple systems supported, why is another one needed? |
The library will now link to zig binding (czmq) under the same condition on a single build. But it will not be restricted to the binding. One important difference about zig binding (czmq) is that libzmq is c++ and implies dual C++ABI support. Zig C++ (stdc++ vs libc++) On linux for example, the other builds will use the system standard (gnu toolchain) or conventional (optional) clang linking to glibc + libstdc++ (GNU). |
You can link it with whatever you want, by passing the appropriate parameters, there's no need for yet another build system to do that |
Yes it can be inconvenient for C/C++ Developer. Having to install dependency by dependency until reaching completion. Now if another build system is unnecessary, then what I can try to do is simply call the process with cmake (and detect if it is installed) and build the binding as shared (on Windows it will be difficult to use zig in cmake). |
Hi again @bluca, Would there be any problem in adding the zig to the CI? If you want I can do that. An important question regarding the library license, I am not a lawyer. But would it be a problem to statically link libzmq into libczmq? From libzmq's side I won't need to add anything else, just test and fix any failures continuously. On your question about: "why a new build-system?" For most C and C++ developers it will seem useless until it is unknown to many. It may happen that don't merge this PR, but I will continue to support each change in the mainline project. This does not interfere with czmq-zig binding as it would continue to bind build optionally. |
As I already said, I don't want to have yet another build system, there's already too many. This is all completely pointless anyway, just use the library provided by the distribution. |
Notably, no bindings are added to the main project, only the introduction an alternative build-system.
Whats is
zon
file?See: ziglang/zig#14290
Steps
Note: This contribution is not intended to rewrite or deconstruct the main project. It only seeks to expand the working tooling for better use and build alternative.