@mineygg/libdave-rs 0.3.0 → 0.3.1
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 +58 -5
- package/binding.cjs +56 -56
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -23,8 +23,13 @@ No compiler is needed.
|
|
|
23
23
|
|
|
24
24
|
**[Read the full documentation](https://github.com/mineygg/libdave-rs/tree/main/docs)**
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
Separate documentation is kept for each language:
|
|
27
|
+
|
|
28
|
+
- [Node.js docs](https://github.com/mineygg/libdave-rs/tree/main/docs/node)
|
|
29
|
+
- [Python docs](https://github.com/mineygg/libdave-rs/tree/main/docs/python)
|
|
30
|
+
- [Rust docs](https://github.com/mineygg/libdave-rs/tree/main/docs/rust)
|
|
31
|
+
|
|
32
|
+
Each includes a getting-started guide, API reference, and integration notes.
|
|
28
33
|
|
|
29
34
|
## Usage
|
|
30
35
|
|
|
@@ -55,8 +60,32 @@ The same library is on crates.io:
|
|
|
55
60
|
cargo add libdave-rs
|
|
56
61
|
```
|
|
57
62
|
|
|
63
|
+
## Python
|
|
64
|
+
|
|
65
|
+
The same bindings are on PyPI, with the same version number and the same API in
|
|
66
|
+
snake_case (`DaveSessionManager.on_mls_commit`, `Session.get_pairwise_fingerprint`, ...):
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
pip install libdave-rs
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
import libdave_rs as dave
|
|
74
|
+
|
|
75
|
+
with dave.DaveSessionManager(self_user_id, group_id) as manager:
|
|
76
|
+
manager.on_select_protocol_ack(dave.max_supported_protocol_version())
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
One `abi3` wheel per platform covers CPython 3.9 and newer; pip picks the right one, and no
|
|
80
|
+
compiler is needed. See [crates/libdave-py](crates/libdave-py) for the Python-specific notes.
|
|
81
|
+
`scripts/check-parity.py` fails CI if anything Node exports is missing from Python.
|
|
82
|
+
|
|
58
83
|
## Platforms
|
|
59
84
|
|
|
85
|
+
The same 13 platforms are supported by both the Node.js and Python packages.
|
|
86
|
+
|
|
87
|
+
### Node.js
|
|
88
|
+
|
|
60
89
|
Each is published as `@mineygg-core/libdave-rs-<platform>`.
|
|
61
90
|
|
|
62
91
|
| OS | x64 | arm64 | armv7 | ppc64le | s390x | riscv64 |
|
|
@@ -70,6 +99,18 @@ The riscv64 binary is smoke tested under QEMU with a Node build from
|
|
|
70
99
|
[unofficial-builds](https://unofficial-builds.nodejs.org), since Node does not
|
|
71
100
|
ship official riscv64 binaries.
|
|
72
101
|
|
|
102
|
+
### Python
|
|
103
|
+
|
|
104
|
+
One `abi3` wheel per platform covers CPython 3.9 and newer. The table shows the wheel
|
|
105
|
+
compatibility tag each platform is built for.
|
|
106
|
+
|
|
107
|
+
| OS | x64 | arm64 | armv7 | ppc64le | s390x | riscv64 |
|
|
108
|
+
| ------------- | --------------- | --------------- | --------------- | ---------------- | --------------- | ---------------- |
|
|
109
|
+
| Linux (glibc) | `manylinux2014` | `manylinux2014` | `manylinux2014` | `manylinux_2_19` | `manylinux2014` | `manylinux_2_27` |
|
|
110
|
+
| Linux (musl) | `musllinux_1_2` | `musllinux_1_2` | `musllinux_1_2` | | | |
|
|
111
|
+
| macOS | `macosx` | `macosx` | | | | |
|
|
112
|
+
| Windows | `win_amd64` | `win_arm64` | | | | |
|
|
113
|
+
|
|
73
114
|
## Layout
|
|
74
115
|
|
|
75
116
|
| Path | What it is |
|
|
@@ -77,6 +118,7 @@ ship official riscv64 binaries.
|
|
|
77
118
|
| `src/` | TypeScript entry point, bundled with tsup (ESM and CJS) |
|
|
78
119
|
| `npm/` | One small package per platform |
|
|
79
120
|
| `crates/libdave-node` | Node-API layer |
|
|
121
|
+
| `crates/libdave-py` | Python layer (PyO3, built with maturin) and its tests |
|
|
80
122
|
| `crates/libdave`, `crates/libdave-sys` | The `libdave-rs` and `libdave-rs-sys` Rust crates |
|
|
81
123
|
|
|
82
124
|
## Development
|
|
@@ -91,15 +133,26 @@ npm run typecheck
|
|
|
91
133
|
npm run test:upstream # Discord's libdave tests, see tests/upstream
|
|
92
134
|
```
|
|
93
135
|
|
|
136
|
+
The Python bindings need only Rust and a C++ compiler:
|
|
137
|
+
|
|
138
|
+
```sh
|
|
139
|
+
pip install maturin pytest
|
|
140
|
+
maturin develop --release -m crates/libdave-py/Cargo.toml
|
|
141
|
+
pytest crates/libdave-py/tests
|
|
142
|
+
python scripts/check-parity.py # Python API still matches the Node API
|
|
143
|
+
```
|
|
144
|
+
|
|
94
145
|
To work on TypeScript only, download the `bindings-<platform>` and `js-binding`
|
|
95
146
|
artifacts from a CI run into the repository root and skip the native build.
|
|
96
147
|
Git hooks are managed by lefthook.
|
|
97
148
|
|
|
98
149
|
## Releasing
|
|
99
150
|
|
|
100
|
-
Set the `NPM_TOKEN` and `CARGO_REGISTRY_TOKEN` repository secrets,
|
|
101
|
-
|
|
102
|
-
`libdave-rs`
|
|
151
|
+
Set the `NPM_TOKEN` and `CARGO_REGISTRY_TOKEN` repository secrets, and register this
|
|
152
|
+
repository and `release.yml` as a [trusted publisher](https://docs.pypi.org/trusted-publishers/)
|
|
153
|
+
for `libdave-rs` on PyPI (or set a `PYPI_API_TOKEN` secret). Then run the commands below.
|
|
154
|
+
This publishes the npm packages, the `libdave-rs-sys` and `libdave-rs` crates and the Python
|
|
155
|
+
wheels, all with the same version. Nothing is published unless every platform builds.
|
|
103
156
|
|
|
104
157
|
```sh
|
|
105
158
|
npm version patch # also bumps the platform packages and crates
|
package/binding.cjs
CHANGED
|
@@ -94,8 +94,8 @@ function requireNative() {
|
|
|
94
94
|
try {
|
|
95
95
|
const binding = require('@mineygg-core/libdave-rs-android-arm64')
|
|
96
96
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-android-arm64/package.json').version
|
|
97
|
-
if (bindingPackageVersion !== '0.3.
|
|
98
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
97
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
98
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
99
99
|
}
|
|
100
100
|
return binding
|
|
101
101
|
} catch (e) {
|
|
@@ -110,8 +110,8 @@ function requireNative() {
|
|
|
110
110
|
try {
|
|
111
111
|
const binding = require('@mineygg-core/libdave-rs-android-arm-eabi')
|
|
112
112
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-android-arm-eabi/package.json').version
|
|
113
|
-
if (bindingPackageVersion !== '0.3.
|
|
114
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
113
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
114
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
115
115
|
}
|
|
116
116
|
return binding
|
|
117
117
|
} catch (e) {
|
|
@@ -131,8 +131,8 @@ function requireNative() {
|
|
|
131
131
|
try {
|
|
132
132
|
const binding = require('@mineygg-core/libdave-rs-win32-x64-gnu')
|
|
133
133
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-win32-x64-gnu/package.json').version
|
|
134
|
-
if (bindingPackageVersion !== '0.3.
|
|
135
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
134
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
135
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
136
136
|
}
|
|
137
137
|
return binding
|
|
138
138
|
} catch (e) {
|
|
@@ -147,8 +147,8 @@ function requireNative() {
|
|
|
147
147
|
try {
|
|
148
148
|
const binding = require('@mineygg-core/libdave-rs-win32-x64-msvc')
|
|
149
149
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-win32-x64-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '0.3.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
150
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
151
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
152
|
}
|
|
153
153
|
return binding
|
|
154
154
|
} catch (e) {
|
|
@@ -164,8 +164,8 @@ function requireNative() {
|
|
|
164
164
|
try {
|
|
165
165
|
const binding = require('@mineygg-core/libdave-rs-win32-ia32-msvc')
|
|
166
166
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-win32-ia32-msvc/package.json').version
|
|
167
|
-
if (bindingPackageVersion !== '0.3.
|
|
168
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
167
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
168
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
169
169
|
}
|
|
170
170
|
return binding
|
|
171
171
|
} catch (e) {
|
|
@@ -180,8 +180,8 @@ function requireNative() {
|
|
|
180
180
|
try {
|
|
181
181
|
const binding = require('@mineygg-core/libdave-rs-win32-arm64-msvc')
|
|
182
182
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-win32-arm64-msvc/package.json').version
|
|
183
|
-
if (bindingPackageVersion !== '0.3.
|
|
184
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
183
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
184
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
185
185
|
}
|
|
186
186
|
return binding
|
|
187
187
|
} catch (e) {
|
|
@@ -199,8 +199,8 @@ function requireNative() {
|
|
|
199
199
|
try {
|
|
200
200
|
const binding = require('@mineygg-core/libdave-rs-darwin-universal')
|
|
201
201
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-darwin-universal/package.json').version
|
|
202
|
-
if (bindingPackageVersion !== '0.3.
|
|
203
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
202
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
203
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
204
204
|
}
|
|
205
205
|
return binding
|
|
206
206
|
} catch (e) {
|
|
@@ -215,8 +215,8 @@ function requireNative() {
|
|
|
215
215
|
try {
|
|
216
216
|
const binding = require('@mineygg-core/libdave-rs-darwin-x64')
|
|
217
217
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-darwin-x64/package.json').version
|
|
218
|
-
if (bindingPackageVersion !== '0.3.
|
|
219
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
218
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
219
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
220
220
|
}
|
|
221
221
|
return binding
|
|
222
222
|
} catch (e) {
|
|
@@ -231,8 +231,8 @@ function requireNative() {
|
|
|
231
231
|
try {
|
|
232
232
|
const binding = require('@mineygg-core/libdave-rs-darwin-arm64')
|
|
233
233
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-darwin-arm64/package.json').version
|
|
234
|
-
if (bindingPackageVersion !== '0.3.
|
|
235
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
234
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
235
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
236
236
|
}
|
|
237
237
|
return binding
|
|
238
238
|
} catch (e) {
|
|
@@ -251,8 +251,8 @@ function requireNative() {
|
|
|
251
251
|
try {
|
|
252
252
|
const binding = require('@mineygg-core/libdave-rs-freebsd-x64')
|
|
253
253
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-freebsd-x64/package.json').version
|
|
254
|
-
if (bindingPackageVersion !== '0.3.
|
|
255
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
254
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
255
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
256
256
|
}
|
|
257
257
|
return binding
|
|
258
258
|
} catch (e) {
|
|
@@ -267,8 +267,8 @@ function requireNative() {
|
|
|
267
267
|
try {
|
|
268
268
|
const binding = require('@mineygg-core/libdave-rs-freebsd-arm64')
|
|
269
269
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-freebsd-arm64/package.json').version
|
|
270
|
-
if (bindingPackageVersion !== '0.3.
|
|
271
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
270
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
271
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
272
272
|
}
|
|
273
273
|
return binding
|
|
274
274
|
} catch (e) {
|
|
@@ -283,8 +283,8 @@ function requireNative() {
|
|
|
283
283
|
try {
|
|
284
284
|
const binding = require('@mineygg-core/libdave-rs-freebsd-ppc64')
|
|
285
285
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-freebsd-ppc64/package.json').version
|
|
286
|
-
if (bindingPackageVersion !== '0.3.
|
|
287
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
286
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
287
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
288
288
|
}
|
|
289
289
|
return binding
|
|
290
290
|
} catch (e) {
|
|
@@ -304,8 +304,8 @@ function requireNative() {
|
|
|
304
304
|
try {
|
|
305
305
|
const binding = require('@mineygg-core/libdave-rs-linux-x64-musl')
|
|
306
306
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-linux-x64-musl/package.json').version
|
|
307
|
-
if (bindingPackageVersion !== '0.3.
|
|
308
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
307
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
308
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
309
309
|
}
|
|
310
310
|
return binding
|
|
311
311
|
} catch (e) {
|
|
@@ -320,8 +320,8 @@ function requireNative() {
|
|
|
320
320
|
try {
|
|
321
321
|
const binding = require('@mineygg-core/libdave-rs-linux-x64-gnu')
|
|
322
322
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-linux-x64-gnu/package.json').version
|
|
323
|
-
if (bindingPackageVersion !== '0.3.
|
|
324
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
323
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
324
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
325
325
|
}
|
|
326
326
|
return binding
|
|
327
327
|
} catch (e) {
|
|
@@ -338,8 +338,8 @@ function requireNative() {
|
|
|
338
338
|
try {
|
|
339
339
|
const binding = require('@mineygg-core/libdave-rs-linux-arm64-musl')
|
|
340
340
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-linux-arm64-musl/package.json').version
|
|
341
|
-
if (bindingPackageVersion !== '0.3.
|
|
342
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
341
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
342
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
343
343
|
}
|
|
344
344
|
return binding
|
|
345
345
|
} catch (e) {
|
|
@@ -354,8 +354,8 @@ function requireNative() {
|
|
|
354
354
|
try {
|
|
355
355
|
const binding = require('@mineygg-core/libdave-rs-linux-arm64-gnu')
|
|
356
356
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-linux-arm64-gnu/package.json').version
|
|
357
|
-
if (bindingPackageVersion !== '0.3.
|
|
358
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
357
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
358
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
359
359
|
}
|
|
360
360
|
return binding
|
|
361
361
|
} catch (e) {
|
|
@@ -372,8 +372,8 @@ function requireNative() {
|
|
|
372
372
|
try {
|
|
373
373
|
const binding = require('@mineygg-core/libdave-rs-linux-arm-musleabihf')
|
|
374
374
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-linux-arm-musleabihf/package.json').version
|
|
375
|
-
if (bindingPackageVersion !== '0.3.
|
|
376
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
375
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
376
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
377
377
|
}
|
|
378
378
|
return binding
|
|
379
379
|
} catch (e) {
|
|
@@ -388,8 +388,8 @@ function requireNative() {
|
|
|
388
388
|
try {
|
|
389
389
|
const binding = require('@mineygg-core/libdave-rs-linux-arm-gnueabihf')
|
|
390
390
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-linux-arm-gnueabihf/package.json').version
|
|
391
|
-
if (bindingPackageVersion !== '0.3.
|
|
392
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
391
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
392
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
393
393
|
}
|
|
394
394
|
return binding
|
|
395
395
|
} catch (e) {
|
|
@@ -406,8 +406,8 @@ function requireNative() {
|
|
|
406
406
|
try {
|
|
407
407
|
const binding = require('@mineygg-core/libdave-rs-linux-loong64-musl')
|
|
408
408
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-linux-loong64-musl/package.json').version
|
|
409
|
-
if (bindingPackageVersion !== '0.3.
|
|
410
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
409
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
410
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
411
411
|
}
|
|
412
412
|
return binding
|
|
413
413
|
} catch (e) {
|
|
@@ -422,8 +422,8 @@ function requireNative() {
|
|
|
422
422
|
try {
|
|
423
423
|
const binding = require('@mineygg-core/libdave-rs-linux-loong64-gnu')
|
|
424
424
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-linux-loong64-gnu/package.json').version
|
|
425
|
-
if (bindingPackageVersion !== '0.3.
|
|
426
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
425
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
426
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
427
427
|
}
|
|
428
428
|
return binding
|
|
429
429
|
} catch (e) {
|
|
@@ -440,8 +440,8 @@ function requireNative() {
|
|
|
440
440
|
try {
|
|
441
441
|
const binding = require('@mineygg-core/libdave-rs-linux-riscv64-musl')
|
|
442
442
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-linux-riscv64-musl/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '0.3.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
443
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
444
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
445
|
}
|
|
446
446
|
return binding
|
|
447
447
|
} catch (e) {
|
|
@@ -456,8 +456,8 @@ function requireNative() {
|
|
|
456
456
|
try {
|
|
457
457
|
const binding = require('@mineygg-core/libdave-rs-linux-riscv64-gnu')
|
|
458
458
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-linux-riscv64-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '0.3.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
459
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
460
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
461
|
}
|
|
462
462
|
return binding
|
|
463
463
|
} catch (e) {
|
|
@@ -473,8 +473,8 @@ function requireNative() {
|
|
|
473
473
|
try {
|
|
474
474
|
const binding = require('@mineygg-core/libdave-rs-linux-ppc64-gnu')
|
|
475
475
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-linux-ppc64-gnu/package.json').version
|
|
476
|
-
if (bindingPackageVersion !== '0.3.
|
|
477
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
476
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
477
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
478
478
|
}
|
|
479
479
|
return binding
|
|
480
480
|
} catch (e) {
|
|
@@ -489,8 +489,8 @@ function requireNative() {
|
|
|
489
489
|
try {
|
|
490
490
|
const binding = require('@mineygg-core/libdave-rs-linux-s390x-gnu')
|
|
491
491
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-linux-s390x-gnu/package.json').version
|
|
492
|
-
if (bindingPackageVersion !== '0.3.
|
|
493
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
492
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
493
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
494
494
|
}
|
|
495
495
|
return binding
|
|
496
496
|
} catch (e) {
|
|
@@ -509,8 +509,8 @@ function requireNative() {
|
|
|
509
509
|
try {
|
|
510
510
|
const binding = require('@mineygg-core/libdave-rs-openharmony-arm64')
|
|
511
511
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-openharmony-arm64/package.json').version
|
|
512
|
-
if (bindingPackageVersion !== '0.3.
|
|
513
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
512
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
513
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
514
514
|
}
|
|
515
515
|
return binding
|
|
516
516
|
} catch (e) {
|
|
@@ -525,8 +525,8 @@ function requireNative() {
|
|
|
525
525
|
try {
|
|
526
526
|
const binding = require('@mineygg-core/libdave-rs-openharmony-x64')
|
|
527
527
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-openharmony-x64/package.json').version
|
|
528
|
-
if (bindingPackageVersion !== '0.3.
|
|
529
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
528
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
529
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
530
530
|
}
|
|
531
531
|
return binding
|
|
532
532
|
} catch (e) {
|
|
@@ -541,8 +541,8 @@ function requireNative() {
|
|
|
541
541
|
try {
|
|
542
542
|
const binding = require('@mineygg-core/libdave-rs-openharmony-arm')
|
|
543
543
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-openharmony-arm/package.json').version
|
|
544
|
-
if (bindingPackageVersion !== '0.3.
|
|
545
|
-
throw new Error(`Native binding package version mismatch, expected 0.3.
|
|
544
|
+
if (bindingPackageVersion !== '0.3.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
545
|
+
throw new Error(`Native binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
546
546
|
}
|
|
547
547
|
return binding
|
|
548
548
|
} catch (e) {
|
|
@@ -683,8 +683,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
683
683
|
if (!candidateFailed) {
|
|
684
684
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
685
685
|
const bindingPackageVersion = require('@mineygg-core/libdave-rs-wasm32-wasi/package.json').version
|
|
686
|
-
if (bindingPackageVersion !== '0.3.
|
|
687
|
-
throw new Error(`WASI binding package version mismatch, expected 0.3.
|
|
686
|
+
if (bindingPackageVersion !== '0.3.1') {
|
|
687
|
+
throw new Error(`WASI binding package version mismatch, expected 0.3.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
690
|
wasiBinding = require('@mineygg-core/libdave-rs-wasm32-wasi')
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@mineygg/libdave-rs",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"description": "Prebuilt Node.js bindings (Rust, Node-API) for Discord's official libdave",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"dave",
|
|
@@ -99,18 +99,18 @@
|
|
|
99
99
|
"vitest": "^4.1.12"
|
|
100
100
|
},
|
|
101
101
|
"optionalDependencies": {
|
|
102
|
-
"@mineygg-core/libdave-rs-linux-x64-gnu": "0.3.
|
|
103
|
-
"@mineygg-core/libdave-rs-linux-arm64-gnu": "0.3.
|
|
104
|
-
"@mineygg-core/libdave-rs-linux-arm-gnueabihf": "0.3.
|
|
105
|
-
"@mineygg-core/libdave-rs-linux-ppc64-gnu": "0.3.
|
|
106
|
-
"@mineygg-core/libdave-rs-linux-s390x-gnu": "0.3.
|
|
107
|
-
"@mineygg-core/libdave-rs-linux-riscv64-gnu": "0.3.
|
|
108
|
-
"@mineygg-core/libdave-rs-linux-x64-musl": "0.3.
|
|
109
|
-
"@mineygg-core/libdave-rs-linux-arm64-musl": "0.3.
|
|
110
|
-
"@mineygg-core/libdave-rs-linux-arm-musleabihf": "0.3.
|
|
111
|
-
"@mineygg-core/libdave-rs-darwin-x64": "0.3.
|
|
112
|
-
"@mineygg-core/libdave-rs-darwin-arm64": "0.3.
|
|
113
|
-
"@mineygg-core/libdave-rs-win32-x64-msvc": "0.3.
|
|
114
|
-
"@mineygg-core/libdave-rs-win32-arm64-msvc": "0.3.
|
|
102
|
+
"@mineygg-core/libdave-rs-linux-x64-gnu": "0.3.1",
|
|
103
|
+
"@mineygg-core/libdave-rs-linux-arm64-gnu": "0.3.1",
|
|
104
|
+
"@mineygg-core/libdave-rs-linux-arm-gnueabihf": "0.3.1",
|
|
105
|
+
"@mineygg-core/libdave-rs-linux-ppc64-gnu": "0.3.1",
|
|
106
|
+
"@mineygg-core/libdave-rs-linux-s390x-gnu": "0.3.1",
|
|
107
|
+
"@mineygg-core/libdave-rs-linux-riscv64-gnu": "0.3.1",
|
|
108
|
+
"@mineygg-core/libdave-rs-linux-x64-musl": "0.3.1",
|
|
109
|
+
"@mineygg-core/libdave-rs-linux-arm64-musl": "0.3.1",
|
|
110
|
+
"@mineygg-core/libdave-rs-linux-arm-musleabihf": "0.3.1",
|
|
111
|
+
"@mineygg-core/libdave-rs-darwin-x64": "0.3.1",
|
|
112
|
+
"@mineygg-core/libdave-rs-darwin-arm64": "0.3.1",
|
|
113
|
+
"@mineygg-core/libdave-rs-win32-x64-msvc": "0.3.1",
|
|
114
|
+
"@mineygg-core/libdave-rs-win32-arm64-msvc": "0.3.1"
|
|
115
115
|
}
|
|
116
116
|
}
|