You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The zig compiler supports C and C++ compilation (by building clang into zig) — the zig cc command is the C compiler and zig c++ is the C++ compiler.
it’s a single download with no dependencies.
It is currently possible to “fool” Nuitka into using zig by creating a shell script named “zig-clang-cc.sh” that passes all command line arguments to zig cc and setting CC=“/path/to/zig-clang-cc.sh”. Note, it is also necessary to pass the --clang option to nuitka.
it would be nice to add support to nuitka for officially detecting when zig is configured as the compiler — when CC is set to zig cc.
Note that full support will probably not work right away, or soon, but it would be good to try to keep improving integration and share bug reports with the zig project, because there are many long-term benefits for using zig.
The text was updated successfully, but these errors were encountered:
I agree, adding that will make it much easier to track the progress on zig side. Notice however that due to ziglang/zig#11415 this may be a very long time away actually.
For older than 3.11, I think we might make it work with using C++03 workaround. Unfortunately, no way to compile for 3.11 without the C11 support there. But ever since MSVC can do C11 now, maybe it's gaining more traction, as e.g. seen in Python.
zig is a nice language and toolchain.
The zig compiler supports C and C++ compilation (by building clang into zig) — the
zig cc
command is the C compiler andzig c++
is the C++ compiler.it’s a single download with no dependencies.
It is currently possible to “fool” Nuitka into using zig by creating a shell script named “zig-clang-cc.sh” that passes all command line arguments to
zig cc
and settingCC=“/path/to/zig-clang-cc.sh”
. Note, it is also necessary to pass the--clang
option to nuitka.I set up a simple project with GitHub action build to test this approach.
initial testing quickly found a bug in zig’s handling of some linker flags.
it would be nice to add support to nuitka for officially detecting when zig is configured as the compiler — when CC is set to
zig cc
.Note that full support will probably not work right away, or soon, but it would be good to try to keep improving integration and share bug reports with the zig project, because there are many long-term benefits for using zig.
The text was updated successfully, but these errors were encountered: