rust-cross/cargo-zigbuild
View on GitHub ↗ ★ 2,706 Rust
Compile Cargo project with zig as linker
8 mentions on Hacker News by 8 people: 2 stories, 6 comments · first 2022-02-16 · latest 2025-11-08
20082026
-
…or borrow checking). [2] I see people linking Rust programs with Zig's toolchain for this reason: https://github.com/rust-cross/cargo-zigbuild
comment by scottlamb · 2025-11-08 · in Zig is so cool, C is cooler -
You should check out cargo-zigbuild which makes use of zig for cross compiling rust projects. https://github.com/rust-cross/cargo-zigbuild
comment by tremololo · 2025-11-08 · in Why is Zig so cool? -
I use this which seems to work well for my projects. Particularly their docker image. https://github.com/rust-cross/cargo-zigbuild
comment by cooljacob204 · 2025-03-17 · in That Time I Recreated Photoshop in C++ -
Interestingly you can use zig within your Rust build to more easily cross-compile: https://github.com/rust-cross/cargo-zigbuild I’m curious what the blockers are for rustc to cross-compile like zig does natively.
comment by vlovich123 · 2024-02-17 · in Show HN: macOS-cross-compiler – Compile binaries for macOS on Linux -
▲ 2
Cargo-zigbuild: Compile Rust using Zig as linker for easier cross compilingstory by cliffcrosland · 2023-11-10 · 1 comment
-
…in Rust, and cross-compilation can be a pain when you have a lot of C dependencies. Fortunately https://github.com/messense/cargo-zigbuild exists. It sounds crazy, but using Zig's inbuilt C compiler to help build my Rust projects has been…
comment by jeffparsons · 2022-10-23 · in C2Rust Transpiler -
Have you tried cargo zigbuild? You can target specific GLIBC versions. https://github.com/messense/cargo-zigbuild
comment by zRedShift · 2022-06-25 · in Building Rust binaries in CI that work with older GLIBC -
▲ 53
Cargo-zigbuild: Compile Cargo project with Zig as linkerstory by kristoff_it · 2022-02-16 · 7 comments