Skip to content

Commit

Permalink
feat(cli): Build the CLI for Windows ARM64, closes #7015 (#7098)
Browse files Browse the repository at this point in the history
* feat(cli): Build the CLI for Windows ARM64

* lockfile
  • Loading branch information
FabianLars authored Jun 1, 2023
1 parent 3303041 commit 0ddbb3a
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .changes/cli-windows-arm64.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'tauri-cli': minor
'@tauri-apps/cli': minor
---

Provide prebuilt CLIs for Windows ARM64 targets.
8 changes: 4 additions & 4 deletions .github/workflows/publish-cli-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ jobs:
build: yarn build:release --target i686-pc-windows-msvc
target: i686-pc-windows-msvc
architecture: x64
- host: windows-latest
architecture: x64
target: aarch64-pc-windows-msvc
build: yarn build:release --target aarch64-pc-windows-msvc --features native-tls-vendored --cargo-flags="--no-default-features"
- host: ubuntu-20.04
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
Expand Down Expand Up @@ -84,10 +88,6 @@ jobs:
rustup target add aarch64-unknown-linux-musl
yarn build:release --target aarch64-unknown-linux-musl
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node
#- host: windows-latest
# architecture: x64
# target: aarch64-pc-windows-msvc
# build: yarn build:release --target aarch64-pc-windows-msvc
name: stable - ${{ matrix.settings.target }} - node@16
runs-on: ${{ matrix.settings.host }}
steps:
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/publish-cli-rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,23 @@ jobs:
- os: ubuntu-20.04
rust_target: x86_64-unknown-linux-gnu
ext: ''
args: ''
- os: macos-latest
rust_target: x86_64-apple-darwin
ext: ''
args: ''
- os: macos-latest
rust_target: aarch64-apple-darwin
ext: ''
args: ''
- os: windows-latest
rust_target: x86_64-pc-windows-msvc
ext: '.exe'
args: ''
- os: windows-latest
rust_target: aarch64-pc-windows-msvc
ext: '.exe'
args: '--no-default-features --features native-tls-vendored'

steps:
- name: Checkout
Expand All @@ -54,7 +62,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path ./tooling/cli/Cargo.toml --release
args: --manifest-path ./tooling/cli/Cargo.toml --release ${{ matrix.config.args }}

- name: Upload CLI
uses: actions/upload-artifact@v3
Expand Down
1 change: 1 addition & 0 deletions tooling/cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions tooling/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ handlebars = "4.3"
include_dir = "0.7"
minisign = "0.7"
base64 = "0.21.0"
ureq = "2.5"
ureq = {version="2.5", default-features = false, features = ["gzip"]}
os_info = "3"
semver = "1.0"
regex = "1.6.0"
Expand Down Expand Up @@ -95,6 +95,7 @@ lto = true

[features]
default = [ "rustls" ]
native-tls = [ "tauri-bundler/native-tls" ]
native-tls-vendored = [ "tauri-bundler/native-tls-vendored" ]
rustls = [ "tauri-bundler/rustls" ]
native-tls = [ "tauri-bundler/native-tls", "ureq/native-tls" ]
# ureq doesn't have a vendored mode but atto's feature should hopefully take care of it.
native-tls-vendored = [ "tauri-bundler/native-tls-vendored", "ureq/native-tls" ]
rustls = [ "tauri-bundler/rustls", "ureq/tls" ]
6 changes: 5 additions & 1 deletion tooling/cli/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ crate-type = ["cdylib"]
# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix
napi = { version = "2.12", default-features = false, features = ["napi4"] }
napi-derive = "2.12"
tauri-cli = { path = ".." }
tauri-cli = { path = "..", default-features = false }
log = "0.4.17"

[build-dependencies]
napi-build = "2.0"

[features]
default = ["tauri-cli/default"]
native-tls-vendored = ["tauri-cli/native-tls-vendored"]
3 changes: 3 additions & 0 deletions tooling/cli/node/npm/win32-arm64-msvc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@tauri-apps/cli-win32-arm64-msvc`

This is the **aarch64-pc-windows-msvc** binary for `@tauri-apps/cli`
21 changes: 21 additions & 0 deletions tooling/cli/node/npm/win32-arm64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "@tauri-apps/cli-win32-arm64-msvc",
"version": "0.0.0",
"publishConfig": {
"access": "public"
},
"os": [
"win32"
],
"cpu": [
"arm64"
],
"main": "cli.win32-arm64-msvc.node",
"files": [
"cli.win32-arm64-msvc.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}

0 comments on commit 0ddbb3a

Please sign in to comment.