$ RUSTFLAGS="-C target-feature=+crt-static" cargo build --release
error: cannot produce proc-macro for `serde_derive v1.0.36` as the target `x86_64-alpine-linux-musl` does not support these crate types
It does not work since cargo 0.18.0, there were no problem with static build in 0.17.0.
It does not work since cargo 0.18.0, there were no problem with static build in 0.17.0.