crane/docs/examples/cross-musl.md

333 B

To build a cargo project with musl to crate statically linked binaries, run the following in a fresh directory:

nix flake init -t github:ipetkov/crane#cross-musl

Alternatively, if you have an existing project already, copy and paste the following flake.nix:

{{#include ../../examples/cross-musl/flake.nix}}