Skip to content

Commit 3c81ba6

Browse files
committed
feat(cli): Build the CLI for Windows ARM64, closes #7015 (#7098)
* feat(cli): Build the CLI for Windows ARM64 * lockfile
1 parent a50f24b commit 3c81ba6

File tree

8 files changed

+53
-7
lines changed

8 files changed

+53
-7
lines changed

.changes/cli-windows-arm64.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'tauri-cli': minor
3+
'@tauri-apps/cli': minor
4+
---
5+
6+
Provide prebuilt CLIs for Windows ARM64 targets.

.github/workflows/publish-cli-js.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ jobs:
4040
build: yarn build:release --target i686-pc-windows-msvc
4141
target: i686-pc-windows-msvc
4242
architecture: x64
43+
- host: windows-latest
44+
architecture: x64
45+
target: aarch64-pc-windows-msvc
46+
build: yarn build:release --target aarch64-pc-windows-msvc --features native-tls-vendored --cargo-flags="--no-default-features"
4347
- host: ubuntu-20.04
4448
target: x86_64-unknown-linux-gnu
4549
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
@@ -84,10 +88,6 @@ jobs:
8488
rustup target add aarch64-unknown-linux-musl
8589
yarn build:release --target aarch64-unknown-linux-musl
8690
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
87-
#- host: windows-latest
88-
# architecture: x64
89-
# target: aarch64-pc-windows-msvc
90-
# build: yarn build:release --target aarch64-pc-windows-msvc
9191
name: stable - ${{ matrix.settings.target }} - node@16
9292
runs-on: ${{ matrix.settings.host }}
9393
steps:

.github/workflows/publish-cli-rs.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,23 @@ jobs:
2121
- os: ubuntu-20.04
2222
rust_target: x86_64-unknown-linux-gnu
2323
ext: ''
24+
args: ''
2425
- os: macos-latest
2526
rust_target: x86_64-apple-darwin
2627
ext: ''
28+
args: ''
2729
- os: macos-latest
2830
rust_target: aarch64-apple-darwin
2931
ext: ''
32+
args: ''
3033
- os: windows-latest
3134
rust_target: x86_64-pc-windows-msvc
3235
ext: '.exe'
36+
args: ''
37+
- os: windows-latest
38+
rust_target: aarch64-pc-windows-msvc
39+
ext: '.exe'
40+
args: '--no-default-features --features native-tls-vendored'
3341

3442
steps:
3543
- uses: actions/checkout@v3
@@ -53,7 +61,7 @@ jobs:
5361
uses: actions-rs/cargo@v1
5462
with:
5563
command: build
56-
args: --manifest-path ./tooling/cli/Cargo.toml --release
64+
args: --manifest-path ./tooling/cli/Cargo.toml --release ${{ matrix.config.args }}
5765

5866
- name: Upload CLI
5967
uses: actions/upload-artifact@v3

tooling/cli/Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tooling/cli/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ handlebars = "4.3"
6969
include_dir = "0.7"
7070
minisign = "0.7"
7171
base64 = "0.21.0"
72-
ureq = "2.5"
72+
ureq = {version="2.5", default-features = false, features = ["gzip"]}
7373
os_info = "3"
7474
semver = "1.0"
7575
regex = "1.6.0"
@@ -106,4 +106,9 @@ libc = "0.2"
106106
lto = true
107107

108108
[features]
109+
default = [ "rustls" ]
109110
openssl-vendored = [ "tauri-mobile/openssl-vendored" ]
111+
native-tls = [ "tauri-bundler/native-tls", "ureq/native-tls" ]
112+
# ureq doesn't have a vendored mode but atto's feature should hopefully take care of it.
113+
native-tls-vendored = [ "tauri-bundler/native-tls-vendored", "ureq/native-tls" ]
114+
rustls = [ "tauri-bundler/rustls", "ureq/tls" ]

tooling/cli/node/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ crate-type = ["cdylib"]
1010
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
1111
napi = { version = "2.12", default-features = false, features = ["napi4"] }
1212
napi-derive = "2.12"
13-
tauri-cli = { path = ".." }
13+
tauri-cli = { path = "..", default-features = false }
1414
log = "0.4.17"
1515

1616
[build-dependencies]
1717
napi-build = "2.0"
1818

1919
[features]
20+
default = ["tauri-cli/default"]
2021
openssl-vendored = ["tauri-cli/openssl-vendored"]
22+
native-tls-vendored = ["tauri-cli/native-tls-vendored"]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `@tauri-apps/cli-win32-arm64-msvc`
2+
3+
This is the **aarch64-pc-windows-msvc** binary for `@tauri-apps/cli`
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "@tauri-apps/cli-win32-arm64-msvc",
3+
"version": "0.0.0",
4+
"publishConfig": {
5+
"access": "public"
6+
},
7+
"os": [
8+
"win32"
9+
],
10+
"cpu": [
11+
"arm64"
12+
],
13+
"main": "cli.win32-arm64-msvc.node",
14+
"files": [
15+
"cli.win32-arm64-msvc.node"
16+
],
17+
"license": "MIT",
18+
"engines": {
19+
"node": ">= 10"
20+
}
21+
}

0 commit comments

Comments
 (0)