diff --git a/.cargo/config.toml b/.cargo/config.toml index 15fab5a..20dba1b 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -6,3 +6,11 @@ rustflags = ["-C", "target-feature=+crt-static"] [alias] # `cargo lint`: the strict check to run before committing. lint = "clippy --all-targets -- -D warnings" +# `cargo linux`: build a Linux binary from any OS (needs, once: +# `rustup target add x86_64-unknown-linux-musl`). It's fully static, so the +# same file runs on Void (glibc or musl), Fedora and other distributions: +# target/x86_64-unknown-linux-musl/release/skyshift +linux = [ + "build", "--release", "--target", "x86_64-unknown-linux-musl", + "--config", "target.x86_64-unknown-linux-musl.linker = 'rust-lld'", +]