3 ms·
> In fact, Nim first compiles to C which in turn is compiled to machine code by the C compiler of your choice (gcc/clang). Can one use the zig compiler after n
by ziofill 1y ago
> In fact, Nim first compiles to C which in turn is compiled to machine code by the C compiler of your choice (gcc/clang).
Can one use the zig compiler after nim has compiled to C?
- blashyrk 1y agoYes, I tried it recently for easy cross-compilation. You can use basically any C/C++ compiler, even TinyCC works (in most scenarios) if you want an extremely fast edit/compile/test cycle.
- Tiberium 1y agoYou can, but zigcc is essentially Clang bundled with extra stuff to make cross compilation easy.
- ethan_smith 1y agoYes, you can use the Zig compiler as a C backend for Nim by setting `--cc:zig` in your Nim compiler flags, which provides better cross-compilation capabilities than traditional C compilers.