Skip to content

Commit 8ab5954

Browse files
authored
Merge pull request #426 from napi-rs/windows-arm64
Windows arm64
2 parents 35bbb1b + 9fc0ea1 commit 8ab5954

File tree

26 files changed

+272
-71
lines changed

26 files changed

+272
-71
lines changed

.github/workflows/ci.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,67 @@ jobs:
156156
name: bindings-win32-i686
157157
path: packages/*/*.node
158158

159+
build-windows-aarch64:
160+
if: "!contains(github.event.head_commit.message, 'skip ci')"
161+
name: stable - windows-aarch64 - node@14
162+
runs-on: windows-latest
163+
steps:
164+
- uses: actions/checkout@v2
165+
166+
- name: Setup node
167+
uses: actions/setup-node@v2-beta
168+
with:
169+
node-version: 14
170+
check-latest: true
171+
172+
- name: Cache NPM dependencies
173+
uses: actions/cache@v1
174+
with:
175+
path: node_modules
176+
key: npm-cache-windows-aarch64-node@lts-${{ hashFiles('yarn.lock') }}
177+
178+
- name: Install dependencies
179+
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000
180+
181+
- name: Build TypeScript
182+
run: yarn build:ts
183+
184+
- name: Install
185+
uses: actions-rs/toolchain@v1
186+
with:
187+
toolchain: stable
188+
profile: minimal
189+
override: true
190+
191+
- name: Install aarch64 toolchain
192+
run: rustup target add aarch64-pc-windows-msvc
193+
194+
- name: Generate Cargo.lock
195+
uses: actions-rs/cargo@v1
196+
with:
197+
command: generate-lockfile
198+
199+
- name: Cache cargo registry
200+
uses: actions/cache@v1
201+
with:
202+
path: ~/.cargo/registry
203+
key: stable-windows-aarch64-node@lts-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
204+
205+
- name: Cache cargo index
206+
uses: actions/cache@v1
207+
with:
208+
path: ~/.cargo/git
209+
key: stable-windows-aarch64-node@lts-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
210+
211+
- name: Run build
212+
run: npx lerna exec "yarn build --target aarch64-pc-windows-msvc" --concurrency 1 --stream --no-prefix
213+
214+
- name: Upload artifact
215+
uses: actions/upload-artifact@v2
216+
with:
217+
name: bindings-win32-aarch64
218+
path: packages/*/*.node
219+
159220
build-musl:
160221
if: "!contains(github.event.head_commit.message, 'skip ci')"
161222
name: stable - linux-musl - node@lts
@@ -718,6 +779,7 @@ jobs:
718779
- build-windows-i686
719780
- build-linux-aarch64-musl
720781
- build-freebsd
782+
- build-windows-aarch64
721783
steps:
722784
- uses: actions/checkout@v2
723785

README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,20 @@ Make rust crates binding to Node.js use [napi-rs](https://github.com/napi-rs/nap
88

99
# Support matrix
1010

11-
| | node10 | node12 | node14 | node15 |
12-
| --------------- | ------ | ------ | ------ | ------ |
13-
| Windows x64 |||||
14-
| Windows x32 |||||
15-
| macOS x64 |||||
16-
| macOS arm64 |||||
17-
| Linux x64 gnu |||||
18-
| Linux x64 musl |||||
19-
| Linux arm gnu |||||
20-
| Linux arm64 gnu |||||
21-
| Android arm64 |||||
11+
| | node12 | node14 | node16 |
12+
| ---------------- | ------ | ------ | ------ |
13+
| Windows x64 ||||
14+
| Windows x32 ||||
15+
| Windows arm64 ||||
16+
| macOS x64 ||||
17+
| macOS arm64 ||||
18+
| Linux x64 gnu ||||
19+
| Linux x64 musl ||||
20+
| Linux arm gnu ||||
21+
| Linux arm64 gnu ||||
22+
| Linux arm64 musl ||||
23+
| Android arm64 ||||
24+
| FreeBSD x64 ||||
2225

2326
# Packages
2427

packages/bcrypt/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ rand = "0.8"
1919
[target.'cfg(all(unix, not(target_env = "musl"), not(target_os = "freebsd"), not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies]
2020
jemallocator = {version = "0.3", features = ["disable_initial_exec_tls"]}
2121

22-
[target.'cfg(windows)'.dependencies]
22+
[target.'cfg(all(windows, not(target_arch = "aarch64")))'.dependencies]
2323
mimalloc = {version = "0.1"}
2424

2525
[dev-dependencies]
2626
quickcheck = "1.0"
2727

2828
[build-dependencies]
29-
napi-build = "1"
29+
napi-build = "1.1.0"

packages/bcrypt/README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@
77

88
## Support matrix
99

10-
| | node10 | node12 | node14 | node15 |
11-
| --------------- | ------ | ------ | ------ | ------ |
12-
| Windows x64 |||||
13-
| Windows x32 |||||
14-
| macOS x64 |||||
15-
| macOS arm64 |||||
16-
| Linux x64 gnu |||||
17-
| Linux x64 musl |||||
18-
| Linux arm gnu |||||
19-
| Linux arm64 gnu |||||
20-
| Android arm64 |||||
10+
| | node12 | node14 | node16 |
11+
| ---------------- | ------ | ------ | ------ |
12+
| Windows x64 ||||
13+
| Windows x32 ||||
14+
| Windows arm64 ||||
15+
| macOS x64 ||||
16+
| macOS arm64 ||||
17+
| Linux x64 gnu ||||
18+
| Linux x64 musl ||||
19+
| Linux arm gnu ||||
20+
| Linux arm64 gnu ||||
21+
| Linux arm64 musl ||||
22+
| Android arm64 ||||
23+
| FreeBSD x64 ||||
2124

2225
## Usage
2326

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `@node-rs/bcrypt-win32-arm64-msvc`
2+
3+
This is the **aarch64-pc-windows-msvc** binary for `@node-rs/bcrypt`
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "@node-rs/bcrypt-win32-arm64-msvc",
3+
"version": "1.2.1",
4+
"os": ["win32"],
5+
"cpu": ["arm64"],
6+
"main": "bcrypt.win32-arm64-msvc.node",
7+
"files": ["bcrypt.win32-arm64-msvc.node"],
8+
"description": "Rust bcrypt binding",
9+
"keywords": ["bcrypt", "auth", "password", "authentication", "encryption", "crypto", "N-API", "napi-rs", "node-rs"],
10+
"author": "LongYinan <[email protected]>",
11+
"homepage": "https://github.com/napi-rs/node-rs",
12+
"license": "MIT",
13+
"engines": {
14+
"node": ">= 10"
15+
},
16+
"publishConfig": {
17+
"registry": "https://registry.npmjs.org/",
18+
"access": "public"
19+
},
20+
"repository": {
21+
"type": "git",
22+
"url": "git+https://github.com/napi-rs/node-rs.git"
23+
},
24+
"bugs": {
25+
"url": "https://github.com/napi-rs/node-rs/issues"
26+
}
27+
}

packages/bcrypt/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"aarch64-apple-darwin",
2222
"aarch64-linux-android",
2323
"x86_64-unknown-freebsd",
24-
"aarch64-unknown-linux-musl"
24+
"aarch64-unknown-linux-musl",
25+
"aarch64-pc-windows-msvc"
2526
]
2627
}
2728
},

packages/bcrypt/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ mod verify_task;
3030
#[global_allocator]
3131
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
3232

33-
#[cfg(windows)]
33+
#[cfg(all(windows, not(target_arch = "aarch64")))]
3434
#[global_allocator]
3535
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;
3636

packages/crc32/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ napi-derive = "1"
1515
[target.'cfg(all(unix, not(target_env = "musl"), not(target_os = "freebsd"), not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies]
1616
jemallocator = {version = "0.3", features = ["disable_initial_exec_tls"]}
1717

18-
[target.'cfg(windows)'.dependencies]
18+
[target.'cfg(all(windows, not(target_arch = "aarch64")))'.dependencies]
1919
mimalloc = {version = "0.1"}
2020

2121
[build-dependencies]
22-
napi-build = "1"
22+
napi-build = "1.1.0"

packages/crc32/README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,20 @@ js_crc32 for inputs 16931844B, avg 2066B x 22.12 ops/sec ±5.20% (40 runs sample
4242

4343
## Support matrix
4444

45-
| | node10 | node12 | node14 | node15 |
46-
| --------------- | ------ | ------ | ------ | ------ |
47-
| Windows x64 |||||
48-
| Windows x32 |||||
49-
| macOS x64 |||||
50-
| macOS arm64 |||||
51-
| Linux x64 gnu |||||
52-
| Linux x64 musl |||||
53-
| Linux arm gnu |||||
54-
| Linux arm64 gnu |||||
55-
| Android arm64 |||||
45+
| | node12 | node14 | node16 |
46+
| ---------------- | ------ | ------ | ------ |
47+
| Windows x64 ||||
48+
| Windows x32 ||||
49+
| Windows arm64 ||||
50+
| macOS x64 ||||
51+
| macOS arm64 ||||
52+
| Linux x64 gnu ||||
53+
| Linux x64 musl ||||
54+
| Linux arm gnu ||||
55+
| Linux arm64 gnu ||||
56+
| Linux arm64 musl ||||
57+
| Android arm64 ||||
58+
| FreeBSD x64 ||||
5659

5760
## API
5861

0 commit comments

Comments
 (0)