| 系统 | 版本 | 
|---|---|
| macbook pro | Ventura 13.5 | 
| linux ubuntu | 22.04.3 LTS/18.04.6 LTS | 
| windows | windows 10 专业版 20H2 | 
| mac下rustc --version | rustc 1.74.0-nightly (58eefc33a 2023-08-24) | 
查看当前系统支持的交叉编译指定系统版本列表
rustup target list
如果已经安装这里会显示(installed)。
 
安装target与对应的链接器
linux通常就是musl和gnu。我用的测试系统是ubuntu,所以是gnu。
musl
rustup target add x86_64-unknown-linux-musl
brew install filosottile/musl-cross/musl-cross