glibc is not statically linkable (because reasons, mainly nss), so you have to link against another libc. Fortunately, rust developers made binary builds of std linked with musl libc available in beta and nightly channels. Which means that all you need is:
-
std linked with musl
http://static.rust-lang.org/dist/$(date -v -1d +'%Y-%m-%d')/rust-std-beta-x86_64-unknown-linux-musl.tar.gz
-
"normal" std for build scripts
http://static.rust-lang.org/dist/$(date -v -1d +'%Y-%m-%d')/rust-std-beta-x86_64-unknown-linux-gnu.tar.gz
-
rustc
http://static.rust-lang.org/dist/$(date -v -1d +'%Y-%m-%d')/rustc-beta-x86_64-unknown-linux-gnu.tar.gz
-
cargo
http://static.rust-lang.org/cargo-dist/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz
Unpack everything and run ./install.sh, it will set up things for you.
Now you can build your crate with: cargo build --target=x86_64-unknown-linux-musl