zigcc
wraps `zig cc` to be able to be called by the nim compiler
Wraps a native library — check OS Compatibility below for platform-specific linking notes.
Summary
| Latest Version | Unknown |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:25 |
Tags
Installation
nimble install zigcc
choosenim install zigcc
git clone https://github.com/enthus1ast/zigcc
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| zigcc | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/enthus1ast/zigcc |
|---|---|
| Homepage | https://github.com/enthus1ast/zigcc |
| Registry Source | nimble_official |
README
installs
zigcczigcpp
to your nimble dir. Both are wrappers for calling zig:
zig cczig c++
also see this https://stackoverflow.com/questions/73345643/how-to-use-the-zig-compiler-in-order-to-compile-nim-code
Installation
nimble install zigcc
windows
nim c --cc:clang --clang.exe="zigcc.cmd" --clang.linkerexe="zigcc.cmd" --forceBuild:on --opt:speed hello.nim
linux and rest
nim c --cc:clang --clang.exe="zigcc" --clang.linkerexe="zigcc" --forceBuild:on --opt:speed hello.nim
cross compilation example
build linux executables from windows:
nim c --cc:clang --clang.exe="zigcc.cmd" --clang.linkerexe="zigcc.cmd" --passc:"-target x86_64-linux-gnu" --passl:"-target x86_64-linux-gnu" --forceBuild:on --os:linux --opt:speed --out:hellolinux hello.nim
build windows executables from linux:
nim c --cc:clang --clang.exe="zigcc" --clang.linkerexe="zigcc" --passc:"-target x86_64-windows" --passl:"-target x86_64-windows" --forceBuild:on --os:windows --opt:speed foo.nim