Rust静态链接 - archlinux + musl

260 阅读1分钟
  • 基于Archlinux
  • 参考Rust-Rfc: 链接
  • 安装 musl
pacman -S musl
  • 安装 Rsut target
rustup target add x86_64-unknown-linux-musl
  • 编译
cargo build --target x86_64-unknown-linux-musl