From dc0274af31ac46a4391cc280b1ce07a448731f39 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Sat, 8 Jun 2024 20:30:32 +0200 Subject: [PATCH] docs: add note about cross-compiling to readme --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index a3f31e4..7a81bf7 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,15 @@ Build with the zig wrapper: The zig wrapper places the downloaded zig compiler in the `.cache` directory and does not touch your system. It requires `bash`, `curl` and `jq` to run. +Thanks to Zig you may also cross-compile from any host to pretty much any +target. For example: + +```shell +zig build -Doptimize=ReleaseFast -Dtarget=x86_64-windows --prefix zig-out/x86_64-windows +zig build -Doptimize=ReleaseFast -Dtarget=x86_64-macos-none --prefix zig-out/x86_64-macos +zig build -Doptimize=ReleaseFast -Dtarget=aarch64-linux-musl --prefix zig-out/aarch64-linux -Dcpu=baseline +``` + # Running Flow Control The output binary is: