@ohos-ports/node-rs-crc32-openharmony-arm64 1.10.7-beta.2 → 1.10.8-beta.0
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/OHOS-BUILD-NOTES.md +3 -0
- package/crc32.openharmony-arm64.node +0 -0
- package/package.json +9 -32
- package/README.md +0 -3
- package/index.d.ts +0 -5
- package/index.js +0 -45
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
# OHOS build notes (@ohos-ports/node-rs-crc32-openharmony-arm64 1.10.8)
|
|
2
|
+
- Toolchain: cargo 1.95.0 --target aarch64-unknown-linux-ohos; source GitHub napi-rs/node-rs @node-rs/crc32@1.10.8; 39s
|
|
3
|
+
- Signed with binary-sign-tool (HMAC self-sign); dlopen-verified on HarmonyOS user-space node v26.8.2 (process.platform=openharmony)
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,45 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohos-ports/node-rs-crc32-openharmony-arm64",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.8-beta.0",
|
|
4
4
|
"cpu": [
|
|
5
5
|
"arm64"
|
|
6
6
|
],
|
|
7
|
-
"
|
|
7
|
+
"os": [
|
|
8
|
+
"openharmony"
|
|
9
|
+
],
|
|
10
|
+
"main": "crc32.openharmony-arm64.node",
|
|
8
11
|
"files": [
|
|
9
12
|
"crc32.openharmony-arm64.node",
|
|
10
|
-
"
|
|
11
|
-
"index.d.ts"
|
|
13
|
+
"OHOS-BUILD-NOTES.md"
|
|
12
14
|
],
|
|
13
|
-
"description": "SIMD crc32
|
|
14
|
-
"keywords": [
|
|
15
|
-
"NAPI",
|
|
16
|
-
"SIMD",
|
|
17
|
-
"crc32",
|
|
18
|
-
"crc32c",
|
|
19
|
-
"napi-rs",
|
|
20
|
-
"node-rs",
|
|
21
|
-
"openharmony",
|
|
22
|
-
"harmonyos"
|
|
23
|
-
],
|
|
24
|
-
"author": "LongYinan <lynweklm@gmail.com>",
|
|
25
|
-
"homepage": "https://github.com/napi-rs/node-rs",
|
|
15
|
+
"description": "SIMD crc32",
|
|
26
16
|
"license": "MIT",
|
|
27
|
-
"engines": {
|
|
28
|
-
"node": ">= 10"
|
|
29
|
-
},
|
|
30
17
|
"repository": {
|
|
31
18
|
"type": "git",
|
|
32
19
|
"url": "https://github.com/ohos-ports/ohos-ports.git",
|
|
33
|
-
"directory": "ports
|
|
34
|
-
}
|
|
35
|
-
"bugs": {
|
|
36
|
-
"url": "https://github.com/ohos-ports/ohos-ports/issues"
|
|
37
|
-
},
|
|
38
|
-
"publishConfig": {
|
|
39
|
-
"registry": "https://registry.npmjs.org/",
|
|
40
|
-
"access": "public"
|
|
41
|
-
},
|
|
42
|
-
"os": [
|
|
43
|
-
"openharmony"
|
|
44
|
-
]
|
|
20
|
+
"directory": "ports/@node-rs/crc32-openharmony-arm64/1.10.8"
|
|
21
|
+
}
|
|
45
22
|
}
|
package/README.md
DELETED
package/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/* auto-generated by NAPI-RS */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
export declare function crc32(input: Uint8Array | string, initialState?: number | undefined | null): number
|
|
4
|
-
|
|
5
|
-
export declare function crc32c(input: Uint8Array | string, initialState?: number | undefined | null): number
|
package/index.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// prettier-ignore
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
// OpenHarmony platform loader for @node-rs/crc32 (migrated from linux-arm64-gnu prebuilt package)
|
|
5
|
-
// Native binary compiled from source (napi-rs, node-rs repo tag @node-rs/crc32@1.10.7) for
|
|
6
|
-
// aarch64-unknown-linux-ohos and signed with binary-sign-tool.
|
|
7
|
-
|
|
8
|
-
const { platform, arch } = process
|
|
9
|
-
let nativeBinding = null
|
|
10
|
-
const loadErrors = []
|
|
11
|
-
|
|
12
|
-
function requireNative() {
|
|
13
|
-
if (platform === 'openharmony') {
|
|
14
|
-
if (arch === 'arm64') {
|
|
15
|
-
try {
|
|
16
|
-
return require('./crc32.openharmony-arm64.node')
|
|
17
|
-
} catch (e) {
|
|
18
|
-
loadErrors.push(e)
|
|
19
|
-
}
|
|
20
|
-
try {
|
|
21
|
-
return require('@ohos-ports/node-rs-crc32-openharmony-arm64')
|
|
22
|
-
} catch (e) {
|
|
23
|
-
loadErrors.push(e)
|
|
24
|
-
}
|
|
25
|
-
} else {
|
|
26
|
-
loadErrors.push(new Error(`Unsupported architecture on openharmony: ${arch}`))
|
|
27
|
-
}
|
|
28
|
-
} else {
|
|
29
|
-
// Non-openharmony platforms try the bundled openharmony binary first (the only
|
|
30
|
-
// binary compiled in this migrated package), then the legacy linux one.
|
|
31
|
-
try {
|
|
32
|
-
return require('./crc32.openharmony-arm64.node')
|
|
33
|
-
} catch (e) {
|
|
34
|
-
loadErrors.push(e)
|
|
35
|
-
}
|
|
36
|
-
try {
|
|
37
|
-
return require('./crc32.linux-arm64-gnu.node')
|
|
38
|
-
} catch (e) {
|
|
39
|
-
loadErrors.push(e)
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
throw new Error('Failed to load native binding:\n' + loadErrors.map((e) => String(e)).join('\n'))
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
module.exports = requireNative()
|