Skip to content

Commit 0ddbb3a

Browse files
authored
feat(cli): Build the CLI for Windows ARM64, closes #7015 (#7098)
* feat(cli): Build the CLI for Windows ARM64 * lockfile
1 parent 3303041 commit 0ddbb3a

File tree

8 files changed

+54
-10
lines changed

8 files changed

+54
-10
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
- name: Checkout
@@ -54,7 +62,7 @@ jobs:
5462
uses: actions-rs/cargo@v1
5563
with:
5664
command: build
57-
args: --manifest-path ./tooling/cli/Cargo.toml --release
65+
args: --manifest-path ./tooling/cli/Cargo.toml --release ${{ matrix.config.args }}
5866

5967
- name: Upload CLI
6068
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: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ handlebars = "4.3"
5959
include_dir = "0.7"
6060
minisign = "0.7"
6161
base64 = "0.21.0"
62-
ureq = "2.5"
62+
ureq = {version="2.5", default-features = false, features = ["gzip"]}
6363
os_info = "3"
6464
semver = "1.0"
6565
regex = "1.6.0"
@@ -95,6 +95,7 @@ lto = true
9595

9696
[features]
9797
default = [ "rustls" ]
98-
native-tls = [ "tauri-bundler/native-tls" ]
99-
native-tls-vendored = [ "tauri-bundler/native-tls-vendored" ]
100-
rustls = [ "tauri-bundler/rustls" ]
98+
native-tls = [ "tauri-bundler/native-tls", "ureq/native-tls" ]
99+
# ureq doesn't have a vendored mode but atto's feature should hopefully take care of it.
100+
native-tls-vendored = [ "tauri-bundler/native-tls-vendored", "ureq/native-tls" ]
101+
rustls = [ "tauri-bundler/rustls", "ureq/tls" ]

tooling/cli/node/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ 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"
18+
19+
[features]
20+
default = ["tauri-cli/default"]
21+
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)