Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,67 @@ jobs:
name: bindings-win32-i686
path: packages/*/*.node

build-windows-aarch64:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: stable - windows-aarch64 - node@14
runs-on: windows-latest
steps:
- uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v2-beta
with:
node-version: 14
check-latest: true

- name: Cache NPM dependencies
uses: actions/cache@v1
with:
path: node_modules
key: npm-cache-windows-aarch64-node@lts-${{ hashFiles('yarn.lock') }}

- name: Install dependencies
run: yarn install --ignore-scripts --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000

- name: Build TypeScript
run: yarn build:ts

- name: Install
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Install aarch64 toolchain
run: rustup target add aarch64-pc-windows-msvc

- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with:
command: generate-lockfile

- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: stable-windows-aarch64-node@lts-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: stable-windows-aarch64-node@lts-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}

- name: Run build
run: npx lerna exec "yarn build --target aarch64-pc-windows-msvc" --concurrency 1 --stream --no-prefix

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: bindings-win32-aarch64
path: packages/*/*.node

build-musl:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: stable - linux-musl - node@lts
Expand Down Expand Up @@ -718,6 +779,7 @@ jobs:
- build-windows-i686
- build-linux-aarch64-musl
- build-freebsd
- build-windows-aarch64
steps:
- uses: actions/checkout@v2

Expand Down
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@ Make rust crates binding to Node.js use [napi-rs](https://github.com/napi-rs/nap

# Support matrix

| | node10 | node12 | node14 | node15 |
| --------------- | ------ | ------ | ------ | ------ |
| Windows x64 | ✓ | ✓ | ✓ | ✓ |
| Windows x32 | ✓ | ✓ | ✓ | ✓ |
| macOS x64 | ✓ | ✓ | ✓ | ✓ |
| macOS arm64 | ✓ | ✓ | ✓ | ✓ |
| Linux x64 gnu | ✓ | ✓ | ✓ | ✓ |
| Linux x64 musl | ✓ | ✓ | ✓ | ✓ |
| Linux arm gnu | ✓ | ✓ | ✓ | ✓ |
| Linux arm64 gnu | ✓ | ✓ | ✓ | ✓ |
| Android arm64 | ✓ | ✓ | ✓ | ✓ |
| | node12 | node14 | node16 |
| ---------------- | ------ | ------ | ------ |
| Windows x64 | ✓ | ✓ | ✓ |
| Windows x32 | ✓ | ✓ | ✓ |
| Windows arm64 | ✓ | ✓ | ✓ |
| macOS x64 | ✓ | ✓ | ✓ |
| macOS arm64 | ✓ | ✓ | ✓ |
| Linux x64 gnu | ✓ | ✓ | ✓ |
| Linux x64 musl | ✓ | ✓ | ✓ |
| Linux arm gnu | ✓ | ✓ | ✓ |
| Linux arm64 gnu | ✓ | ✓ | ✓ |
| Linux arm64 musl | ✓ | ✓ | ✓ |
| Android arm64 | ✓ | ✓ | ✓ |
| FreeBSD x64 | ✓ | ✓ | ✓ |

# Packages

Expand Down
4 changes: 2 additions & 2 deletions packages/bcrypt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ rand = "0.8"
[target.'cfg(all(unix, not(target_env = "musl"), not(target_os = "freebsd"), not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies]
jemallocator = {version = "0.3", features = ["disable_initial_exec_tls"]}

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

[dev-dependencies]
quickcheck = "1.0"

[build-dependencies]
napi-build = "1"
napi-build = "1.1.0"
25 changes: 14 additions & 11 deletions packages/bcrypt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@

## Support matrix

| | node10 | node12 | node14 | node15 |
| --------------- | ------ | ------ | ------ | ------ |
| Windows x64 | ✓ | ✓ | ✓ | ✓ |
| Windows x32 | ✓ | ✓ | ✓ | ✓ |
| macOS x64 | ✓ | ✓ | ✓ | ✓ |
| macOS arm64 | ✓ | ✓ | ✓ | ✓ |
| Linux x64 gnu | ✓ | ✓ | ✓ | ✓ |
| Linux x64 musl | ✓ | ✓ | ✓ | ✓ |
| Linux arm gnu | ✓ | ✓ | ✓ | ✓ |
| Linux arm64 gnu | ✓ | ✓ | ✓ | ✓ |
| Android arm64 | ✓ | ✓ | ✓ | ✓ |
| | node12 | node14 | node16 |
| ---------------- | ------ | ------ | ------ |
| Windows x64 | ✓ | ✓ | ✓ |
| Windows x32 | ✓ | ✓ | ✓ |
| Windows arm64 | ✓ | ✓ | ✓ |
| macOS x64 | ✓ | ✓ | ✓ |
| macOS arm64 | ✓ | ✓ | ✓ |
| Linux x64 gnu | ✓ | ✓ | ✓ |
| Linux x64 musl | ✓ | ✓ | ✓ |
| Linux arm gnu | ✓ | ✓ | ✓ |
| Linux arm64 gnu | ✓ | ✓ | ✓ |
| Linux arm64 musl | ✓ | ✓ | ✓ |
| Android arm64 | ✓ | ✓ | ✓ |
| FreeBSD x64 | ✓ | ✓ | ✓ |

## Usage

Expand Down
3 changes: 3 additions & 0 deletions packages/bcrypt/npm/win32-arm64-msvc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@node-rs/bcrypt-win32-arm64-msvc`

This is the **aarch64-pc-windows-msvc** binary for `@node-rs/bcrypt`
27 changes: 27 additions & 0 deletions packages/bcrypt/npm/win32-arm64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@node-rs/bcrypt-win32-arm64-msvc",
"version": "1.2.1",
"os": ["win32"],
"cpu": ["arm64"],
"main": "bcrypt.win32-arm64-msvc.node",
"files": ["bcrypt.win32-arm64-msvc.node"],
"description": "Rust bcrypt binding",
"keywords": ["bcrypt", "auth", "password", "authentication", "encryption", "crypto", "N-API", "napi-rs", "node-rs"],
"author": "LongYinan <lynweklm@gmail.com>",
"homepage": "https://github.com/napi-rs/node-rs",
"license": "MIT",
"engines": {
"node": ">= 10"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/napi-rs/node-rs.git"
},
"bugs": {
"url": "https://github.com/napi-rs/node-rs/issues"
}
}
3 changes: 2 additions & 1 deletion packages/bcrypt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"aarch64-apple-darwin",
"aarch64-linux-android",
"x86_64-unknown-freebsd",
"aarch64-unknown-linux-musl"
"aarch64-unknown-linux-musl",
"aarch64-pc-windows-msvc"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/bcrypt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mod verify_task;
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;

#[cfg(windows)]
#[cfg(all(windows, not(target_arch = "aarch64")))]
#[global_allocator]
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;

Expand Down
4 changes: 2 additions & 2 deletions packages/crc32/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ napi-derive = "1"
[target.'cfg(all(unix, not(target_env = "musl"), not(target_os = "freebsd"), not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies]
jemallocator = {version = "0.3", features = ["disable_initial_exec_tls"]}

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

[build-dependencies]
napi-build = "1"
napi-build = "1.1.0"
25 changes: 14 additions & 11 deletions packages/crc32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,20 @@ js_crc32 for inputs 16931844B, avg 2066B x 22.12 ops/sec ±5.20% (40 runs sample

## Support matrix

| | node10 | node12 | node14 | node15 |
| --------------- | ------ | ------ | ------ | ------ |
| Windows x64 | ✓ | ✓ | ✓ | ✓ |
| Windows x32 | ✓ | ✓ | ✓ | ✓ |
| macOS x64 | ✓ | ✓ | ✓ | ✓ |
| macOS arm64 | ✓ | ✓ | ✓ | ✓ |
| Linux x64 gnu | ✓ | ✓ | ✓ | ✓ |
| Linux x64 musl | ✓ | ✓ | ✓ | ✓ |
| Linux arm gnu | ✓ | ✓ | ✓ | ✓ |
| Linux arm64 gnu | ✓ | ✓ | ✓ | ✓ |
| Android arm64 | ✓ | ✓ | ✓ | ✓ |
| | node12 | node14 | node16 |
| ---------------- | ------ | ------ | ------ |
| Windows x64 | ✓ | ✓ | ✓ |
| Windows x32 | ✓ | ✓ | ✓ |
| Windows arm64 | ✓ | ✓ | ✓ |
| macOS x64 | ✓ | ✓ | ✓ |
| macOS arm64 | ✓ | ✓ | ✓ |
| Linux x64 gnu | ✓ | ✓ | ✓ |
| Linux x64 musl | ✓ | ✓ | ✓ |
| Linux arm gnu | ✓ | ✓ | ✓ |
| Linux arm64 gnu | ✓ | ✓ | ✓ |
| Linux arm64 musl | ✓ | ✓ | ✓ |
| Android arm64 | ✓ | ✓ | ✓ |
| FreeBSD x64 | ✓ | ✓ | ✓ |

## API

Expand Down
3 changes: 3 additions & 0 deletions packages/crc32/npm/win32-arm64-msvc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@node-rs/crc32-win32-arm64-msvc`

This is the **aarch64-pc-windows-msvc** binary for `@node-rs/crc32`
27 changes: 27 additions & 0 deletions packages/crc32/npm/win32-arm64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@node-rs/crc32-win32-arm64-msvc",
"version": "1.1.0",
"os": ["win32"],
"cpu": ["arm64"],
"main": "crc32.win32-arm64-msvc.node",
"files": ["crc32.win32-arm64-msvc.node"],
"description": "SIMD crc32",
"keywords": ["SIMD", "NAPI", "napi-rs", "node-rs", "crc32", "crc32c"],
"author": "LongYinan <lynweklm@gmail.com>",
"homepage": "https://github.com/napi-rs/node-rs",
"license": "MIT",
"engines": {
"node": ">= 10"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/napi-rs/node-rs.git"
},
"bugs": {
"url": "https://github.com/napi-rs/node-rs/issues"
}
}
3 changes: 2 additions & 1 deletion packages/crc32/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"aarch64-apple-darwin",
"aarch64-linux-android",
"x86_64-unknown-freebsd",
"aarch64-unknown-linux-musl"
"aarch64-unknown-linux-musl",
"aarch64-pc-windows-msvc"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/crc32/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::convert::TryInto;
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;

#[cfg(windows)]
#[cfg(all(windows, not(target_arch = "aarch64")))]
#[global_allocator]
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;

Expand Down
4 changes: 2 additions & 2 deletions packages/deno-lint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ termcolor = "1.1"
[target.'cfg(all(unix, not(target_env = "musl"), not(target_os = "freebsd"), not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies]
jemallocator = {version = "0.3", features = ["disable_initial_exec_tls"]}

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

[build-dependencies]
napi-build = "1"
napi-build = "1.1.0"
25 changes: 14 additions & 11 deletions packages/deno-lint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@

## Support matrix

| | node10 | node12 | node14 | node15 |
| --------------- | ------ | ------ | ------ | ------ |
| Windows x64 | ✓ | ✓ | ✓ | ✓ |
| Windows x32 | ✓ | ✓ | ✓ | ✓ |
| macOS x64 | ✓ | ✓ | ✓ | ✓ |
| macOS arm64 | ✓ | ✓ | ✓ | ✓ |
| Linux x64 gnu | ✓ | ✓ | ✓ | ✓ |
| Linux x64 musl | ✓ | ✓ | ✓ | ✓ |
| Linux arm gnu | ✓ | ✓ | ✓ | ✓ |
| Linux arm64 gnu | ✓ | ✓ | ✓ | ✓ |
| Android arm64 | ✓ | ✓ | ✓ | ✓ |
| | node12 | node14 | node16 |
| ---------------- | ------ | ------ | ------ |
| Windows x64 | ✓ | ✓ | ✓ |
| Windows x32 | ✓ | ✓ | ✓ |
| Windows arm64 | ✓ | ✓ | ✓ |
| macOS x64 | ✓ | ✓ | ✓ |
| macOS arm64 | ✓ | ✓ | ✓ |
| Linux x64 gnu | ✓ | ✓ | ✓ |
| Linux x64 musl | ✓ | ✓ | ✓ |
| Linux arm gnu | ✓ | ✓ | ✓ |
| Linux arm64 gnu | ✓ | ✓ | ✓ |
| Linux arm64 musl | ✓ | ✓ | ✓ |
| Android arm64 | ✓ | ✓ | ✓ |
| FreeBSD x64 | ✓ | ✓ | ✓ |

## Performance

Expand Down
3 changes: 3 additions & 0 deletions packages/deno-lint/npm/win32-arm64-msvc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@node-rs/deno-lint-win32-arm64-msvc`

This is the **aarch64-pc-windows-msvc** binary for `@node-rs/deno-lint`
27 changes: 27 additions & 0 deletions packages/deno-lint/npm/win32-arm64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@node-rs/deno-lint-win32-arm64-msvc",
"version": "1.1.0",
"os": ["win32"],
"cpu": ["arm64"],
"main": "deno-lint.win32-arm64-msvc.node",
"files": ["deno-lint.win32-arm64-msvc.node"],
"description": "Deno lint binding for Node.js",
"keywords": ["Deno", "Lint", "ESLint", "node-rs", "napi", "N-API", "Rust", "napi-rs"],
"author": "LongYinan <lynweklm@gmail.com>",
"homepage": "https://github.com/napi-rs/node-rs",
"license": "MIT",
"engines": {
"node": ">= 10"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/napi-rs/node-rs.git"
},
"bugs": {
"url": "https://github.com/napi-rs/node-rs/issues"
}
}
3 changes: 2 additions & 1 deletion packages/deno-lint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"aarch64-apple-darwin",
"aarch64-linux-android",
"x86_64-unknown-freebsd",
"aarch64-unknown-linux-musl"
"aarch64-unknown-linux-musl",
"aarch64-pc-windows-msvc"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/deno-lint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use termcolor::{BufferWriter, ColorChoice};
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;

#[cfg(windows)]
#[cfg(all(windows, not(target_arch = "aarch64")))]
#[global_allocator]
static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc;

Expand Down
Loading