@pid7/ashwa 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -23
- package/native/index.darwin-arm64.node +0 -0
- package/native/index.js +58 -60
- package/native/index.linux-arm64-gnu.node +0 -0
- package/native/index.linux-x64-gnu.node +0 -0
- package/native/index.win32-arm64-msvc.node +0 -0
- package/native/index.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,14 +6,17 @@
|
|
|
6
6
|
|
|
7
7
|
Hardware accelerated routines for single substring search
|
|
8
8
|
|
|
9
|
-
> 💡 TIP:
|
|
9
|
+
> 💡 TIP:
|
|
10
|
+
> `@pid7/ashwa` runs seamlessly across Node.js, Bun, Deno, and modern browser / WebWorker environments.
|
|
10
11
|
|
|
11
|
-
> ℹ️ NOTE:
|
|
12
|
-
> SIMD for
|
|
12
|
+
> ℹ️ NOTE:
|
|
13
|
+
> The optimal execution backend (native N-API SIMD bindings for Node / Bun / Deno or WebAssembly SIMD for browsers)
|
|
14
|
+
> is automatically detected and selected at runtime with zero manual configuration.
|
|
13
15
|
|
|
14
16
|
## Index
|
|
15
17
|
|
|
16
18
|
- [Supported Platforms](#supported-platforms)
|
|
19
|
+
- [`AVX512` Support](#avx512-support)
|
|
17
20
|
- [Installation](#installation)
|
|
18
21
|
- [Usage](#usage)
|
|
19
22
|
- [Node](#node)
|
|
@@ -36,6 +39,13 @@ Hardware accelerated routines for single substring search
|
|
|
36
39
|
| AArch64 (ARM64) | Apple Silicon, Linux ARM64 | 128-bit ARM NEON | 64-bit SWAR |
|
|
37
40
|
| WebAssembly | Browsers, WebWorkers, Node.js (wasm32) | WASM SIMD128 (`simd128`) | 32-bit SWAR |
|
|
38
41
|
|
|
42
|
+
## `AVX512` Support
|
|
43
|
+
|
|
44
|
+
> ℹ️ NOTE:
|
|
45
|
+
> On x86_64 machines where the `AVX512BW` ISA is supported by the CPU, `ashwa` automatically detects and uses
|
|
46
|
+
> the ISA for hardware acceleration at runtime. Unlike Rust, no nightly toolchain, compile-time flags, or extra
|
|
47
|
+
> setup are required.
|
|
48
|
+
|
|
39
49
|
## Installation
|
|
40
50
|
|
|
41
51
|
Install `@pid7/ashwa` using your preferred package manager:
|
|
@@ -149,16 +159,16 @@ Boolean flag indicating whether `@pid7/ashwa` is executing via native N-API bind
|
|
|
149
159
|
> Benchmarks are evaluated across dedicated AWS EC2 hardware environments on Node.js `v22.23.2`,
|
|
150
160
|
>
|
|
151
161
|
> * x86_64 (_x64_)
|
|
152
|
-
> * Instance: Intel(R) Xeon(R) Platinum
|
|
162
|
+
> * Instance: Intel(R) Xeon(R) Platinum 8488C (8C/16T)
|
|
153
163
|
> * ISA: _AVX-512BW_ (`+nightly`) · _WASM SIMD128_ (stable)
|
|
154
|
-
> * Cache: L1d: 384 KiB · L1i: 256 KiB · L2:
|
|
155
|
-
> * STREAM Triad:
|
|
164
|
+
> * Cache: L1d: 384 KiB · L1i: 256 KiB · L2: 16 MiB · L3: 105 MiB
|
|
165
|
+
> * STREAM Triad: 25.76 GiB/s
|
|
156
166
|
>
|
|
157
167
|
> * AArch64 (_arm64_)
|
|
158
168
|
> * Instance: AWS Graviton3 ARM Neoverse-V1 (16C/16T)
|
|
159
169
|
> * ISA: _NEON_ (stable)
|
|
160
170
|
> * Cache: L1d: 1 MiB · L1i: 1 MiB · L2: 16 MiB · L3: 32 MiB
|
|
161
|
-
> * STREAM Triad: 75.
|
|
171
|
+
> * STREAM Triad: 75.48 GiB/s
|
|
162
172
|
|
|
163
173
|
### `searchOne`
|
|
164
174
|
|
|
@@ -166,19 +176,23 @@ Boolean flag indicating whether `@pid7/ashwa` is executing via native N-API bind
|
|
|
166
176
|
|
|
167
177
|
| Level | Payload | Latency (x64) | Latency (arm64) | Throughput (x64) | Throughput (arm64) |
|
|
168
178
|
|:-----------|:----------|:--------------|:----------------|:-----------------|:-------------------|
|
|
169
|
-
| L1 Cache | 32 KiB |
|
|
170
|
-
| L2 Cache | 512 KiB |
|
|
171
|
-
| L3 Cache | 16 MiB |
|
|
172
|
-
| RAM | 256 MiB | 20.
|
|
179
|
+
| L1 Cache | 32 KiB | 259.88 ns | 730.67 ns | 117.43 GiB/s | 41.77 GiB/s |
|
|
180
|
+
| L2 Cache | 512 KiB | 6.90 µs | 11.15 µs | 70.76 GiB/s | 43.78 GiB/s |
|
|
181
|
+
| L3 Cache | 16 MiB | 488.06 µs | 376.89 µs | 32.01 GiB/s | 41.46 GiB/s |
|
|
182
|
+
| RAM | 256 MiB | 20.19 ms | 9.84 ms | 12.38 GiB/s | 25.40 GiB/s |
|
|
183
|
+
| RAM | 512 MiB | 41.79 ms | 19.60 ms | 11.96 GiB/s | 25.52 GiB/s |
|
|
184
|
+
| RAM | 1 GiB | 83.68 ms | 39.11 ms | 11.95 GiB/s | 25.57 GiB/s |
|
|
173
185
|
|
|
174
186
|
#### WebAssembly (WASM SIMD128)
|
|
175
187
|
|
|
176
188
|
| Level | Payload | Latency (x64) | Throughput (x64) |
|
|
177
189
|
|:-----------|:----------|:--------------|:-----------------|
|
|
178
|
-
| L1 Cache | 32 KiB | 1.
|
|
179
|
-
| L2 Cache | 512 KiB |
|
|
180
|
-
| L3 Cache | 16 MiB | 1.
|
|
181
|
-
| RAM | 256 MiB |
|
|
190
|
+
| L1 Cache | 32 KiB | 1.28 µs | 23.88 GiB/s |
|
|
191
|
+
| L2 Cache | 512 KiB | 20.77 µs | 23.51 GiB/s |
|
|
192
|
+
| L3 Cache | 16 MiB | 1.53 ms | 10.22 GiB/s |
|
|
193
|
+
| RAM | 256 MiB | 48.19 ms | 5.19 GiB/s |
|
|
194
|
+
| RAM | 512 MiB | 96.64 ms | 5.17 GiB/s |
|
|
195
|
+
| RAM | 1 GiB | 192.52 ms | 5.19 GiB/s |
|
|
182
196
|
|
|
183
197
|
### `searchTwo`
|
|
184
198
|
|
|
@@ -186,16 +200,20 @@ Boolean flag indicating whether `@pid7/ashwa` is executing via native N-API bind
|
|
|
186
200
|
|
|
187
201
|
| Level | Payload | Latency (x64) | Latency (arm64) | Throughput (x64) | Throughput (arm64) |
|
|
188
202
|
|:-----------|:----------|:--------------|:----------------|:-----------------|:-------------------|
|
|
189
|
-
| L1 Cache | 32 KiB |
|
|
190
|
-
| L2 Cache | 512 KiB |
|
|
191
|
-
| L3 Cache | 16 MiB |
|
|
192
|
-
| RAM | 256 MiB |
|
|
203
|
+
| L1 Cache | 32 KiB | 563.60 ns | 1.57 µs | 54.15 GiB/s | 19.38 GiB/s |
|
|
204
|
+
| L2 Cache | 512 KiB | 12.14 µs | 23.93 µs | 40.22 GiB/s | 20.40 GiB/s |
|
|
205
|
+
| L3 Cache | 16 MiB | 558.19 µs | 771.07 µs | 27.99 GiB/s | 20.26 GiB/s |
|
|
206
|
+
| RAM | 256 MiB | 20.05 ms | 13.03 ms | 12.47 GiB/s | 19.18 GiB/s |
|
|
207
|
+
| RAM | 512 MiB | 41.59 ms | 26.07 ms | 12.02 GiB/s | 19.18 GiB/s |
|
|
208
|
+
| RAM | 1 GiB | 83.70 ms | 52.08 ms | 11.95 GiB/s | 19.20 GiB/s |
|
|
193
209
|
|
|
194
210
|
#### WebAssembly (WASM SIMD128)
|
|
195
211
|
|
|
196
212
|
| Level | Payload | Latency (x64) | Throughput (x64) |
|
|
197
213
|
|:-----------|:----------|:--------------|:-----------------|
|
|
198
|
-
| L1 Cache | 32 KiB |
|
|
199
|
-
| L2 Cache | 512 KiB |
|
|
200
|
-
| L3 Cache | 16 MiB |
|
|
201
|
-
| RAM | 256 MiB |
|
|
214
|
+
| L1 Cache | 32 KiB | 1.87 µs | 16.31 GiB/s |
|
|
215
|
+
| L2 Cache | 512 KiB | 28.72 µs | 17.00 GiB/s |
|
|
216
|
+
| L3 Cache | 16 MiB | 1.80 ms | 8.69 GiB/s |
|
|
217
|
+
| RAM | 256 MiB | 53.44 ms | 4.68 GiB/s |
|
|
218
|
+
| RAM | 512 MiB | 106.71 ms | 4.69 GiB/s |
|
|
219
|
+
| RAM | 1 GiB | 213.08 ms | 4.69 GiB/s |
|
|
Binary file
|
package/native/index.js
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
// @ts-nocheck
|
|
4
4
|
/* auto-generated by NAPI-RS */
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
import { createRequire } from 'module'
|
|
8
|
-
const require = createRequire(import.meta.url)
|
|
6
|
+
const { readFileSync } = require('fs')
|
|
9
7
|
let nativeBinding = null;
|
|
10
8
|
const loadErrors = [];
|
|
11
9
|
|
|
@@ -93,12 +91,12 @@ function requireNative() {
|
|
|
93
91
|
require("@pid7/ashwa-native-android-arm64/package.json").version;
|
|
94
92
|
|
|
95
93
|
if (
|
|
96
|
-
bindingPackageVersion !== "0.2.
|
|
94
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
97
95
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
98
96
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
99
97
|
) {
|
|
100
98
|
throw new Error(
|
|
101
|
-
`Native binding package version mismatch, expected 0.2.
|
|
99
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
102
100
|
);
|
|
103
101
|
}
|
|
104
102
|
|
|
@@ -119,12 +117,12 @@ function requireNative() {
|
|
|
119
117
|
require("@pid7/ashwa-native-android-arm-eabi/package.json").version;
|
|
120
118
|
|
|
121
119
|
if (
|
|
122
|
-
bindingPackageVersion !== "0.2.
|
|
120
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
123
121
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
124
122
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
125
123
|
) {
|
|
126
124
|
throw new Error(
|
|
127
|
-
`Native binding package version mismatch, expected 0.2.
|
|
125
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
128
126
|
);
|
|
129
127
|
}
|
|
130
128
|
|
|
@@ -159,12 +157,12 @@ function requireNative() {
|
|
|
159
157
|
require("@pid7/ashwa-native-win32-x64-gnu/package.json").version;
|
|
160
158
|
|
|
161
159
|
if (
|
|
162
|
-
bindingPackageVersion !== "0.2.
|
|
160
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
163
161
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
164
162
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
165
163
|
) {
|
|
166
164
|
throw new Error(
|
|
167
|
-
`Native binding package version mismatch, expected 0.2.
|
|
165
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
168
166
|
);
|
|
169
167
|
}
|
|
170
168
|
|
|
@@ -185,12 +183,12 @@ function requireNative() {
|
|
|
185
183
|
require("@pid7/ashwa-native-win32-x64-msvc/package.json").version;
|
|
186
184
|
|
|
187
185
|
if (
|
|
188
|
-
bindingPackageVersion !== "0.2.
|
|
186
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
189
187
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
190
188
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
191
189
|
) {
|
|
192
190
|
throw new Error(
|
|
193
|
-
`Native binding package version mismatch, expected 0.2.
|
|
191
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
194
192
|
);
|
|
195
193
|
}
|
|
196
194
|
|
|
@@ -212,12 +210,12 @@ function requireNative() {
|
|
|
212
210
|
require("@pid7/ashwa-native-win32-ia32-msvc/package.json").version;
|
|
213
211
|
|
|
214
212
|
if (
|
|
215
|
-
bindingPackageVersion !== "0.2.
|
|
213
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
216
214
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
217
215
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
218
216
|
) {
|
|
219
217
|
throw new Error(
|
|
220
|
-
`Native binding package version mismatch, expected 0.2.
|
|
218
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
221
219
|
);
|
|
222
220
|
}
|
|
223
221
|
|
|
@@ -238,12 +236,12 @@ function requireNative() {
|
|
|
238
236
|
require("@pid7/ashwa-native-win32-arm64-msvc/package.json").version;
|
|
239
237
|
|
|
240
238
|
if (
|
|
241
|
-
bindingPackageVersion !== "0.2.
|
|
239
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
242
240
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
243
241
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
244
242
|
) {
|
|
245
243
|
throw new Error(
|
|
246
|
-
`Native binding package version mismatch, expected 0.2.
|
|
244
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
247
245
|
);
|
|
248
246
|
}
|
|
249
247
|
|
|
@@ -269,12 +267,12 @@ function requireNative() {
|
|
|
269
267
|
require("@pid7/ashwa-native-darwin-universal/package.json").version;
|
|
270
268
|
|
|
271
269
|
if (
|
|
272
|
-
bindingPackageVersion !== "0.2.
|
|
270
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
273
271
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
274
272
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
275
273
|
) {
|
|
276
274
|
throw new Error(
|
|
277
|
-
`Native binding package version mismatch, expected 0.2.
|
|
275
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
278
276
|
);
|
|
279
277
|
}
|
|
280
278
|
|
|
@@ -294,12 +292,12 @@ function requireNative() {
|
|
|
294
292
|
const bindingPackageVersion =
|
|
295
293
|
require("@pid7/ashwa-native-darwin-x64/package.json").version;
|
|
296
294
|
if (
|
|
297
|
-
bindingPackageVersion !== "0.2.
|
|
295
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
298
296
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
299
297
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
300
298
|
) {
|
|
301
299
|
throw new Error(
|
|
302
|
-
`Native binding package version mismatch, expected 0.2.
|
|
300
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
303
301
|
);
|
|
304
302
|
}
|
|
305
303
|
|
|
@@ -320,12 +318,12 @@ function requireNative() {
|
|
|
320
318
|
require("@pid7/ashwa-native-darwin-arm64/package.json").version;
|
|
321
319
|
|
|
322
320
|
if (
|
|
323
|
-
bindingPackageVersion !== "0.2.
|
|
321
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
324
322
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
325
323
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
326
324
|
) {
|
|
327
325
|
throw new Error(
|
|
328
|
-
`Native binding package version mismatch, expected 0.2.
|
|
326
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
329
327
|
);
|
|
330
328
|
}
|
|
331
329
|
|
|
@@ -352,12 +350,12 @@ function requireNative() {
|
|
|
352
350
|
require("@pid7/ashwa-native-freebsd-x64/package.json").version;
|
|
353
351
|
|
|
354
352
|
if (
|
|
355
|
-
bindingPackageVersion !== "0.2.
|
|
353
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
356
354
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
357
355
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
358
356
|
) {
|
|
359
357
|
throw new Error(
|
|
360
|
-
`Native binding package version mismatch, expected 0.2.
|
|
358
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
361
359
|
);
|
|
362
360
|
}
|
|
363
361
|
|
|
@@ -378,12 +376,12 @@ function requireNative() {
|
|
|
378
376
|
require("@pid7/ashwa-native-freebsd-arm64/package.json").version;
|
|
379
377
|
|
|
380
378
|
if (
|
|
381
|
-
bindingPackageVersion !== "0.2.
|
|
379
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
382
380
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
383
381
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
384
382
|
) {
|
|
385
383
|
throw new Error(
|
|
386
|
-
`Native binding package version mismatch, expected 0.2.
|
|
384
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
387
385
|
);
|
|
388
386
|
}
|
|
389
387
|
|
|
@@ -411,12 +409,12 @@ function requireNative() {
|
|
|
411
409
|
require("@pid7/ashwa-native-linux-x64-musl/package.json").version;
|
|
412
410
|
|
|
413
411
|
if (
|
|
414
|
-
bindingPackageVersion !== "0.2.
|
|
412
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
415
413
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
416
414
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
417
415
|
) {
|
|
418
416
|
throw new Error(
|
|
419
|
-
`Native binding package version mismatch, expected 0.2.
|
|
417
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
420
418
|
);
|
|
421
419
|
}
|
|
422
420
|
|
|
@@ -437,12 +435,12 @@ function requireNative() {
|
|
|
437
435
|
require("@pid7/ashwa-native-linux-x64-gnu/package.json").version;
|
|
438
436
|
|
|
439
437
|
if (
|
|
440
|
-
bindingPackageVersion !== "0.2.
|
|
438
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
441
439
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
442
440
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
443
441
|
) {
|
|
444
442
|
throw new Error(
|
|
445
|
-
`Native binding package version mismatch, expected 0.2.
|
|
443
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
446
444
|
);
|
|
447
445
|
}
|
|
448
446
|
|
|
@@ -465,12 +463,12 @@ function requireNative() {
|
|
|
465
463
|
require("@pid7/ashwa-native-linux-arm64-musl/package.json").version;
|
|
466
464
|
|
|
467
465
|
if (
|
|
468
|
-
bindingPackageVersion !== "0.2.
|
|
466
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
469
467
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
470
468
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
471
469
|
) {
|
|
472
470
|
throw new Error(
|
|
473
|
-
`Native binding package version mismatch, expected 0.2.
|
|
471
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
474
472
|
);
|
|
475
473
|
}
|
|
476
474
|
|
|
@@ -491,12 +489,12 @@ function requireNative() {
|
|
|
491
489
|
require("@pid7/ashwa-native-linux-arm64-gnu/package.json").version;
|
|
492
490
|
|
|
493
491
|
if (
|
|
494
|
-
bindingPackageVersion !== "0.2.
|
|
492
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
495
493
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
496
494
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
497
495
|
) {
|
|
498
496
|
throw new Error(
|
|
499
|
-
`Native binding package version mismatch, expected 0.2.
|
|
497
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
500
498
|
);
|
|
501
499
|
}
|
|
502
500
|
|
|
@@ -518,12 +516,12 @@ function requireNative() {
|
|
|
518
516
|
const bindingPackageVersion =
|
|
519
517
|
require("@pid7/ashwa-native-linux-arm-musleabihf/package.json").version;
|
|
520
518
|
if (
|
|
521
|
-
bindingPackageVersion !== "0.2.
|
|
519
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
522
520
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
523
521
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
524
522
|
) {
|
|
525
523
|
throw new Error(
|
|
526
|
-
`Native binding package version mismatch, expected 0.2.
|
|
524
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
527
525
|
);
|
|
528
526
|
}
|
|
529
527
|
return binding;
|
|
@@ -541,12 +539,12 @@ function requireNative() {
|
|
|
541
539
|
const bindingPackageVersion =
|
|
542
540
|
require("@pid7/ashwa-native-linux-arm-gnueabihf/package.json").version;
|
|
543
541
|
if (
|
|
544
|
-
bindingPackageVersion !== "0.2.
|
|
542
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
545
543
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
546
544
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
547
545
|
) {
|
|
548
546
|
throw new Error(
|
|
549
|
-
`Native binding package version mismatch, expected 0.2.
|
|
547
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
550
548
|
);
|
|
551
549
|
}
|
|
552
550
|
return binding;
|
|
@@ -566,12 +564,12 @@ function requireNative() {
|
|
|
566
564
|
const bindingPackageVersion =
|
|
567
565
|
require("@pid7/ashwa-native-linux-loong64-musl/package.json").version;
|
|
568
566
|
if (
|
|
569
|
-
bindingPackageVersion !== "0.2.
|
|
567
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
570
568
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
571
569
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
572
570
|
) {
|
|
573
571
|
throw new Error(
|
|
574
|
-
`Native binding package version mismatch, expected 0.2.
|
|
572
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
575
573
|
);
|
|
576
574
|
}
|
|
577
575
|
return binding;
|
|
@@ -589,12 +587,12 @@ function requireNative() {
|
|
|
589
587
|
const bindingPackageVersion =
|
|
590
588
|
require("@pid7/ashwa-native-linux-loong64-gnu/package.json").version;
|
|
591
589
|
if (
|
|
592
|
-
bindingPackageVersion !== "0.2.
|
|
590
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
593
591
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
594
592
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
595
593
|
) {
|
|
596
594
|
throw new Error(
|
|
597
|
-
`Native binding package version mismatch, expected 0.2.
|
|
595
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
598
596
|
);
|
|
599
597
|
}
|
|
600
598
|
return binding;
|
|
@@ -614,12 +612,12 @@ function requireNative() {
|
|
|
614
612
|
const bindingPackageVersion =
|
|
615
613
|
require("@pid7/ashwa-native-linux-riscv64-musl/package.json").version;
|
|
616
614
|
if (
|
|
617
|
-
bindingPackageVersion !== "0.2.
|
|
615
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
618
616
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
619
617
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
620
618
|
) {
|
|
621
619
|
throw new Error(
|
|
622
|
-
`Native binding package version mismatch, expected 0.2.
|
|
620
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
623
621
|
);
|
|
624
622
|
}
|
|
625
623
|
return binding;
|
|
@@ -637,12 +635,12 @@ function requireNative() {
|
|
|
637
635
|
const bindingPackageVersion =
|
|
638
636
|
require("@pid7/ashwa-native-linux-riscv64-gnu/package.json").version;
|
|
639
637
|
if (
|
|
640
|
-
bindingPackageVersion !== "0.2.
|
|
638
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
641
639
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
642
640
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
643
641
|
) {
|
|
644
642
|
throw new Error(
|
|
645
|
-
`Native binding package version mismatch, expected 0.2.
|
|
643
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
646
644
|
);
|
|
647
645
|
}
|
|
648
646
|
return binding;
|
|
@@ -661,12 +659,12 @@ function requireNative() {
|
|
|
661
659
|
const bindingPackageVersion =
|
|
662
660
|
require("@pid7/ashwa-native-linux-ppc64-gnu/package.json").version;
|
|
663
661
|
if (
|
|
664
|
-
bindingPackageVersion !== "0.2.
|
|
662
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
665
663
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
666
664
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
667
665
|
) {
|
|
668
666
|
throw new Error(
|
|
669
|
-
`Native binding package version mismatch, expected 0.2.
|
|
667
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
670
668
|
);
|
|
671
669
|
}
|
|
672
670
|
return binding;
|
|
@@ -684,12 +682,12 @@ function requireNative() {
|
|
|
684
682
|
const bindingPackageVersion =
|
|
685
683
|
require("@pid7/ashwa-native-linux-s390x-gnu/package.json").version;
|
|
686
684
|
if (
|
|
687
|
-
bindingPackageVersion !== "0.2.
|
|
685
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
688
686
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
689
687
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
690
688
|
) {
|
|
691
689
|
throw new Error(
|
|
692
|
-
`Native binding package version mismatch, expected 0.2.
|
|
690
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
693
691
|
);
|
|
694
692
|
}
|
|
695
693
|
return binding;
|
|
@@ -713,12 +711,12 @@ function requireNative() {
|
|
|
713
711
|
const bindingPackageVersion =
|
|
714
712
|
require("@pid7/ashwa-native-openharmony-arm64/package.json").version;
|
|
715
713
|
if (
|
|
716
|
-
bindingPackageVersion !== "0.2.
|
|
714
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
717
715
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
718
716
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
719
717
|
) {
|
|
720
718
|
throw new Error(
|
|
721
|
-
`Native binding package version mismatch, expected 0.2.
|
|
719
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
722
720
|
);
|
|
723
721
|
}
|
|
724
722
|
return binding;
|
|
@@ -736,12 +734,12 @@ function requireNative() {
|
|
|
736
734
|
const bindingPackageVersion =
|
|
737
735
|
require("@pid7/ashwa-native-openharmony-x64/package.json").version;
|
|
738
736
|
if (
|
|
739
|
-
bindingPackageVersion !== "0.2.
|
|
737
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
740
738
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
741
739
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
742
740
|
) {
|
|
743
741
|
throw new Error(
|
|
744
|
-
`Native binding package version mismatch, expected 0.2.
|
|
742
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
745
743
|
);
|
|
746
744
|
}
|
|
747
745
|
return binding;
|
|
@@ -759,12 +757,12 @@ function requireNative() {
|
|
|
759
757
|
const bindingPackageVersion =
|
|
760
758
|
require("@pid7/ashwa-native-openharmony-arm/package.json").version;
|
|
761
759
|
if (
|
|
762
|
-
bindingPackageVersion !== "0.2.
|
|
760
|
+
bindingPackageVersion !== "0.2.3" &&
|
|
763
761
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
764
762
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0"
|
|
765
763
|
) {
|
|
766
764
|
throw new Error(
|
|
767
|
-
`Native binding package version mismatch, expected 0.2.
|
|
765
|
+
`Native binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
768
766
|
);
|
|
769
767
|
}
|
|
770
768
|
return binding;
|
|
@@ -927,9 +925,9 @@ if (!nativeBinding || forceWasi) {
|
|
|
927
925
|
) {
|
|
928
926
|
const bindingPackageVersion =
|
|
929
927
|
require("@pid7/ashwa-native-wasm32-wasi/package.json").version;
|
|
930
|
-
if (bindingPackageVersion !== "0.2.
|
|
928
|
+
if (bindingPackageVersion !== "0.2.3") {
|
|
931
929
|
throw new Error(
|
|
932
|
-
`WASI binding package version mismatch, expected 0.2.
|
|
930
|
+
`WASI binding package version mismatch, expected 0.2.3 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
933
931
|
);
|
|
934
932
|
}
|
|
935
933
|
}
|
|
@@ -980,6 +978,6 @@ if (!nativeBinding) {
|
|
|
980
978
|
throw new Error(`Failed to load native binding`);
|
|
981
979
|
}
|
|
982
980
|
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
981
|
+
module.exports = nativeBinding;
|
|
982
|
+
module.exports.searchOne = nativeBinding.searchOne;
|
|
983
|
+
module.exports.searchTwo = nativeBinding.searchTwo;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|