add multi-architecture support for MacOS

This commit is contained in:
Tlntin
2023-01-26 11:42:54 +08:00
parent e238d242db
commit 7c07d3f227
7 changed files with 79 additions and 10 deletions

20
bin/README.md vendored
View File

@@ -124,3 +124,23 @@ url 为你需要打包的网页链接 🔗,必须提供。
# 或者
-f <value>
```
#### [multi-arch]
打包结果同时支持英特尔和m1芯片仅适用于MacOS默认为 `false`。
##### 准备工作
- 注意开启该选项后需要用rust官网的rustup安装rust不支持brew安装。
- 对于intel芯片用户需要安装arm64跨平台包使安装包支持m1芯片使用下面命令安装。
```shell
rustup target add aarch64-apple-darwin
```
- 对于M1芯片用户需要安装x86跨平台包使安装包支持interl芯片使用下面的命令安装。
```shell
rustup target add x86_64-apple-darwin
```
##### 使用方法
```shell
--multi-arch <value>
# 或者
-m <value>
```