Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Cross.toml file and a note on using it #379

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -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"
]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down