Open domenkozar opened 1 year ago
This is relative simple to do with https://github.com/Cloudef/nix-zig-stdenv, but Rust doesnt like it https://github.com/ziglang/zig/issues/5320.
Things become more ugly, if you want to cross-compiling the compiler itself: https://github.com/ziglang/zig-bootstrap. nix has for this https://nix.dev/tutorials/cross-compilation, but building from source works roughly the same for every cross-compiler (unless no state of the art optimizer is involved).
There is also a way to make this work in cmake https://github.com/mrexodia/zig-cross.
Based on the https://nix.dev/tutorials/cross-compilation#cross-compilation, integrate cross-compilation as first-class citizen.