diff --git a/Cross.toml b/Cross.toml new file mode 100644 index 0000000..36f60cc --- /dev/null +++ b/Cross.toml @@ -0,0 +1,6 @@ +[target.x86_64-unknown-linux-musl] +image="rust:1.68-alpine" +pre-build = [ + "apk update && apk upgrade", + "apk add lz4-dev libsodium-dev libsodium-static libc-dev" +] diff --git a/README.md b/README.md index ea2895b..1c0d981 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,15 @@ $ cargo build --release $ cp ./target/release/bupstash $INSTALL_DIR ``` +If you need a statically linked `musl` build for e.g. your NAS box, you can do +this with [cross](https://github.com/cross-rs/cross). (You also need Docker +installed and working). + +```sh +$ cargo install cross --git https://github.com/cross-rs/cross +$ cross build --target x86_64-unknown-linux-musl --release +``` + ### Pkgconf You can use pkgconf instead of pkg-config (this is required on freebsd) by setting