wickra-compile 0.1.1 → 0.1.2
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 +43 -36
- package/index.js +54 -54
- package/package.json +7 -7
- package/wickra-compile.darwin-arm64.node +0 -0
- package/wickra-compile.darwin-x64.node +0 -0
- package/wickra-compile.linux-arm64-gnu.node +0 -0
- package/wickra-compile.linux-x64-gnu.node +0 -0
- package/wickra-compile.win32-arm64-msvc.node +0 -0
- package/wickra-compile.win32-x64-msvc.node +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<a href="https://wickra.org"><img src="https://raw.githubusercontent.com/wickra-lib/.github/main/profile/wickra-banner.webp?v=514" alt="Wickra Compile — compile a strategy spec into a standalone deployable" width="100%"></a>
|
|
2
|
+
<a href="https://wickra.org"><img src="https://raw.githubusercontent.com/wickra-lib/.github/main/profile/wickra-banner.webp?v=514-7" alt="Wickra Compile — compile a strategy spec into a standalone deployable" width="100%"></a>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
[](https://github.com/wickra-lib/wickra)
|
|
@@ -19,22 +19,24 @@
|
|
|
19
19
|
[](https://scorecard.dev/viewer/?uri=github.com/wickra-lib/wickra-compile)
|
|
20
20
|
[](https://www.bestpractices.dev)
|
|
21
21
|
[](https://github.com/wickra-lib/wickra-compile/attestations)
|
|
22
|
-
[](https://wickra.org)
|
|
22
|
+
[](https://compile.wickra.org)
|
|
23
23
|
[](golden/)
|
|
24
24
|
[](#determinism)
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
-
# Wickra Compile
|
|
29
|
-
|
|
30
28
|
**Compile a strategy spec into a standalone deployable: a WASM module, a
|
|
31
29
|
self-contained binary, or a `no_std` artifact for microcontrollers. Write once
|
|
32
30
|
as data, deploy anywhere.**
|
|
33
31
|
|
|
34
|
-
>
|
|
35
|
-
>
|
|
36
|
-
>
|
|
37
|
-
|
|
32
|
+
> **▶ Live demos:** the backtester compiled to WebAssembly, an equity curve building bar by bar — **[backtest-live.wickra.org](https://backtest-live.wickra.org)**;
|
|
33
|
+
> one StrategySpec side by side in Python, Rust, JS and Go — **[playground.wickra.org](https://playground.wickra.org)**;
|
|
34
|
+
> all 514 indicators of the core over a real Binance feed — **[live.wickra.org](https://live.wickra.org)**. Zero backend, all of them.
|
|
35
|
+
|
|
36
|
+
**Part of the [Wickra ecosystem](#ecosystem):** the same data-driven core and ten-language binding surface also power [wickra-exchange](https://github.com/wickra-lib/wickra-exchange), [wickra-backtest](https://github.com/wickra-lib/wickra-backtest), [wickra-terminal](https://github.com/wickra-lib/wickra-terminal) and 20 more — see [the full list](https://github.com/wickra-lib).
|
|
37
|
+
same [`StrategySpec`](https://github.com/wickra-lib/wickra-backtest) that
|
|
38
|
+
`wickra-backtest` runs and emits a self-contained project that embeds the spec
|
|
39
|
+
and calls the Wickra engine — no interpreter, no runtime spec parsing.
|
|
38
40
|
|
|
39
41
|
Wickra Compile is the **output** side of strategy authoring: instead of wrestling
|
|
40
42
|
a Pine-like input language, you write your strategy as a `StrategySpec` (data),
|
|
@@ -53,9 +55,18 @@ cargo run -p wickra-compile -- --spec golden/specs/sma_cross.json --dry-run --ou
|
|
|
53
55
|
|
|
54
56
|
## Status
|
|
55
57
|
|
|
56
|
-
|
|
58
|
+
**0.1.2 — the current release.** The codegen core, the reference CLI, the
|
|
57
59
|
ten-language binding surface, the golden corpus and the full CI matrix are in
|
|
58
|
-
place
|
|
60
|
+
place.
|
|
61
|
+
|
|
62
|
+
## Documentation
|
|
63
|
+
|
|
64
|
+
- [ARCHITECTURE.md](docs/ARCHITECTURE.md) — the crates and the codegen pipeline.
|
|
65
|
+
- [COMPILESPEC.md](docs/COMPILESPEC.md) — the input schema.
|
|
66
|
+
- [TARGETS.md](docs/TARGETS.md) — WASM / binary / `no_std` and the MCU allowlist.
|
|
67
|
+
- [DETERMINISM.md](docs/DETERMINISM.md) — why the manifest is reproducible.
|
|
68
|
+
- [TEMPLATES.md](docs/TEMPLATES.md) — codegen and injection safety.
|
|
69
|
+
- [Cookbook.md](docs/Cookbook.md) — practical recipes.
|
|
59
70
|
|
|
60
71
|
## How it works
|
|
61
72
|
|
|
@@ -110,15 +121,6 @@ print(out["manifest"]["project_hash"]) # identical in every binding
|
|
|
110
121
|
|
|
111
122
|
See [`examples/`](examples/) for the same program in all ten languages.
|
|
112
123
|
|
|
113
|
-
## Documentation
|
|
114
|
-
|
|
115
|
-
- [ARCHITECTURE.md](docs/ARCHITECTURE.md) — the crates and the codegen pipeline.
|
|
116
|
-
- [COMPILESPEC.md](docs/COMPILESPEC.md) — the input schema.
|
|
117
|
-
- [TARGETS.md](docs/TARGETS.md) — WASM / binary / `no_std` and the MCU allowlist.
|
|
118
|
-
- [DETERMINISM.md](docs/DETERMINISM.md) — why the manifest is reproducible.
|
|
119
|
-
- [TEMPLATES.md](docs/TEMPLATES.md) — codegen and injection safety.
|
|
120
|
-
- [Cookbook.md](docs/Cookbook.md) — practical recipes.
|
|
121
|
-
|
|
122
124
|
## Project layout
|
|
123
125
|
|
|
124
126
|
```
|
|
@@ -171,12 +173,6 @@ Run the suites with the commands in
|
|
|
171
173
|
- **Fuzz** — `fuzz/` holds libFuzzer targets over spec and target parsing, the
|
|
172
174
|
canonical hash and the codegen; CI runs each for a short smoke.
|
|
173
175
|
|
|
174
|
-
## Benchmarks
|
|
175
|
-
|
|
176
|
-
Codegen is pure data templating and hashing — tens of microseconds, no
|
|
177
|
-
compilation. See [BENCHMARKS.md](BENCHMARKS.md); reproduce with
|
|
178
|
-
`cargo bench -p compile-bench`.
|
|
179
|
-
|
|
180
176
|
## Requirements
|
|
181
177
|
|
|
182
178
|
- **Rust 1.86+** — the workspace MSRV; the Node binding needs **Rust 1.88**.
|
|
@@ -192,11 +188,11 @@ compilation. See [BENCHMARKS.md](BENCHMARKS.md); reproduce with
|
|
|
192
188
|
|
|
193
189
|
See each `bindings/<lang>/README.md` for the per-language build and install.
|
|
194
190
|
|
|
195
|
-
##
|
|
191
|
+
## Benchmarks
|
|
196
192
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
193
|
+
Codegen is pure data templating and hashing — tens of microseconds, no
|
|
194
|
+
compilation. See [BENCHMARKS.md](BENCHMARKS.md); reproduce with
|
|
195
|
+
`cargo bench -p compile-bench`.
|
|
200
196
|
|
|
201
197
|
## Ecosystem
|
|
202
198
|
|
|
@@ -235,17 +231,28 @@ in-browser demo at [wickra.org](https://wickra.org).
|
|
|
235
231
|
|
|
236
232
|
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
237
233
|
|
|
234
|
+
## Security
|
|
235
|
+
|
|
236
|
+
See [SECURITY.md](SECURITY.md) and [THREAT_MODEL.md](THREAT_MODEL.md). The
|
|
237
|
+
compiler generates code and can invoke `cargo` on it — run it only on trusted
|
|
238
|
+
specs.
|
|
239
|
+
|
|
238
240
|
## License
|
|
239
241
|
|
|
240
|
-
|
|
242
|
+
Licensed under either of
|
|
243
|
+
|
|
244
|
+
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
|
|
245
|
+
<http://www.apache.org/licenses/LICENSE-2.0>)
|
|
246
|
+
- MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
|
|
247
|
+
|
|
248
|
+
at your option. Use it, fork it, modify it, redistribute it — commercially or
|
|
249
|
+
not — file issues, send pull requests; all welcome.
|
|
241
250
|
|
|
242
|
-
|
|
243
|
-
- MIT license ([LICENSE-MIT](LICENSE-MIT))
|
|
251
|
+
### Contribution
|
|
244
252
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
conditions.
|
|
253
|
+
Unless you explicitly state otherwise, any contribution intentionally submitted
|
|
254
|
+
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
|
|
255
|
+
dual licensed as above, without any additional terms or conditions.
|
|
249
256
|
|
|
250
257
|
## Disclaimer
|
|
251
258
|
|
package/index.js
CHANGED
|
@@ -76,8 +76,8 @@ function requireNative() {
|
|
|
76
76
|
try {
|
|
77
77
|
const binding = require('wickra-compile-android-arm64')
|
|
78
78
|
const bindingPackageVersion = require('wickra-compile-android-arm64/package.json').version
|
|
79
|
-
if (bindingPackageVersion !== '0.1.
|
|
80
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
79
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
80
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
81
81
|
}
|
|
82
82
|
return binding
|
|
83
83
|
} catch (e) {
|
|
@@ -92,8 +92,8 @@ function requireNative() {
|
|
|
92
92
|
try {
|
|
93
93
|
const binding = require('wickra-compile-android-arm-eabi')
|
|
94
94
|
const bindingPackageVersion = require('wickra-compile-android-arm-eabi/package.json').version
|
|
95
|
-
if (bindingPackageVersion !== '0.1.
|
|
96
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
95
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
96
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
97
97
|
}
|
|
98
98
|
return binding
|
|
99
99
|
} catch (e) {
|
|
@@ -113,8 +113,8 @@ function requireNative() {
|
|
|
113
113
|
try {
|
|
114
114
|
const binding = require('wickra-compile-win32-x64-gnu')
|
|
115
115
|
const bindingPackageVersion = require('wickra-compile-win32-x64-gnu/package.json').version
|
|
116
|
-
if (bindingPackageVersion !== '0.1.
|
|
117
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
116
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
117
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
118
118
|
}
|
|
119
119
|
return binding
|
|
120
120
|
} catch (e) {
|
|
@@ -129,8 +129,8 @@ function requireNative() {
|
|
|
129
129
|
try {
|
|
130
130
|
const binding = require('wickra-compile-win32-x64-msvc')
|
|
131
131
|
const bindingPackageVersion = require('wickra-compile-win32-x64-msvc/package.json').version
|
|
132
|
-
if (bindingPackageVersion !== '0.1.
|
|
133
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
132
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
133
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
134
134
|
}
|
|
135
135
|
return binding
|
|
136
136
|
} catch (e) {
|
|
@@ -146,8 +146,8 @@ function requireNative() {
|
|
|
146
146
|
try {
|
|
147
147
|
const binding = require('wickra-compile-win32-ia32-msvc')
|
|
148
148
|
const bindingPackageVersion = require('wickra-compile-win32-ia32-msvc/package.json').version
|
|
149
|
-
if (bindingPackageVersion !== '0.1.
|
|
150
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
149
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
150
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
151
151
|
}
|
|
152
152
|
return binding
|
|
153
153
|
} catch (e) {
|
|
@@ -162,8 +162,8 @@ function requireNative() {
|
|
|
162
162
|
try {
|
|
163
163
|
const binding = require('wickra-compile-win32-arm64-msvc')
|
|
164
164
|
const bindingPackageVersion = require('wickra-compile-win32-arm64-msvc/package.json').version
|
|
165
|
-
if (bindingPackageVersion !== '0.1.
|
|
166
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
165
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
166
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
167
167
|
}
|
|
168
168
|
return binding
|
|
169
169
|
} catch (e) {
|
|
@@ -181,8 +181,8 @@ function requireNative() {
|
|
|
181
181
|
try {
|
|
182
182
|
const binding = require('wickra-compile-darwin-universal')
|
|
183
183
|
const bindingPackageVersion = require('wickra-compile-darwin-universal/package.json').version
|
|
184
|
-
if (bindingPackageVersion !== '0.1.
|
|
185
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
184
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
185
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
186
186
|
}
|
|
187
187
|
return binding
|
|
188
188
|
} catch (e) {
|
|
@@ -197,8 +197,8 @@ function requireNative() {
|
|
|
197
197
|
try {
|
|
198
198
|
const binding = require('wickra-compile-darwin-x64')
|
|
199
199
|
const bindingPackageVersion = require('wickra-compile-darwin-x64/package.json').version
|
|
200
|
-
if (bindingPackageVersion !== '0.1.
|
|
201
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
200
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
201
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
202
202
|
}
|
|
203
203
|
return binding
|
|
204
204
|
} catch (e) {
|
|
@@ -213,8 +213,8 @@ function requireNative() {
|
|
|
213
213
|
try {
|
|
214
214
|
const binding = require('wickra-compile-darwin-arm64')
|
|
215
215
|
const bindingPackageVersion = require('wickra-compile-darwin-arm64/package.json').version
|
|
216
|
-
if (bindingPackageVersion !== '0.1.
|
|
217
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
216
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
217
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
218
218
|
}
|
|
219
219
|
return binding
|
|
220
220
|
} catch (e) {
|
|
@@ -233,8 +233,8 @@ function requireNative() {
|
|
|
233
233
|
try {
|
|
234
234
|
const binding = require('wickra-compile-freebsd-x64')
|
|
235
235
|
const bindingPackageVersion = require('wickra-compile-freebsd-x64/package.json').version
|
|
236
|
-
if (bindingPackageVersion !== '0.1.
|
|
237
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
236
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
237
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
238
238
|
}
|
|
239
239
|
return binding
|
|
240
240
|
} catch (e) {
|
|
@@ -249,8 +249,8 @@ function requireNative() {
|
|
|
249
249
|
try {
|
|
250
250
|
const binding = require('wickra-compile-freebsd-arm64')
|
|
251
251
|
const bindingPackageVersion = require('wickra-compile-freebsd-arm64/package.json').version
|
|
252
|
-
if (bindingPackageVersion !== '0.1.
|
|
253
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
252
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
253
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
254
254
|
}
|
|
255
255
|
return binding
|
|
256
256
|
} catch (e) {
|
|
@@ -270,8 +270,8 @@ function requireNative() {
|
|
|
270
270
|
try {
|
|
271
271
|
const binding = require('wickra-compile-linux-x64-musl')
|
|
272
272
|
const bindingPackageVersion = require('wickra-compile-linux-x64-musl/package.json').version
|
|
273
|
-
if (bindingPackageVersion !== '0.1.
|
|
274
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
273
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
274
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
275
275
|
}
|
|
276
276
|
return binding
|
|
277
277
|
} catch (e) {
|
|
@@ -286,8 +286,8 @@ function requireNative() {
|
|
|
286
286
|
try {
|
|
287
287
|
const binding = require('wickra-compile-linux-x64-gnu')
|
|
288
288
|
const bindingPackageVersion = require('wickra-compile-linux-x64-gnu/package.json').version
|
|
289
|
-
if (bindingPackageVersion !== '0.1.
|
|
290
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
289
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
290
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
291
291
|
}
|
|
292
292
|
return binding
|
|
293
293
|
} catch (e) {
|
|
@@ -304,8 +304,8 @@ function requireNative() {
|
|
|
304
304
|
try {
|
|
305
305
|
const binding = require('wickra-compile-linux-arm64-musl')
|
|
306
306
|
const bindingPackageVersion = require('wickra-compile-linux-arm64-musl/package.json').version
|
|
307
|
-
if (bindingPackageVersion !== '0.1.
|
|
308
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
307
|
+
if (bindingPackageVersion !== '0.1.2' && 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.1.2 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('wickra-compile-linux-arm64-gnu')
|
|
322
322
|
const bindingPackageVersion = require('wickra-compile-linux-arm64-gnu/package.json').version
|
|
323
|
-
if (bindingPackageVersion !== '0.1.
|
|
324
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
323
|
+
if (bindingPackageVersion !== '0.1.2' && 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.1.2 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('wickra-compile-linux-arm-musleabihf')
|
|
340
340
|
const bindingPackageVersion = require('wickra-compile-linux-arm-musleabihf/package.json').version
|
|
341
|
-
if (bindingPackageVersion !== '0.1.
|
|
342
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
341
|
+
if (bindingPackageVersion !== '0.1.2' && 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.1.2 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('wickra-compile-linux-arm-gnueabihf')
|
|
356
356
|
const bindingPackageVersion = require('wickra-compile-linux-arm-gnueabihf/package.json').version
|
|
357
|
-
if (bindingPackageVersion !== '0.1.
|
|
358
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
357
|
+
if (bindingPackageVersion !== '0.1.2' && 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.1.2 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('wickra-compile-linux-loong64-musl')
|
|
374
374
|
const bindingPackageVersion = require('wickra-compile-linux-loong64-musl/package.json').version
|
|
375
|
-
if (bindingPackageVersion !== '0.1.
|
|
376
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
375
|
+
if (bindingPackageVersion !== '0.1.2' && 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.1.2 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('wickra-compile-linux-loong64-gnu')
|
|
390
390
|
const bindingPackageVersion = require('wickra-compile-linux-loong64-gnu/package.json').version
|
|
391
|
-
if (bindingPackageVersion !== '0.1.
|
|
392
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
391
|
+
if (bindingPackageVersion !== '0.1.2' && 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.1.2 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('wickra-compile-linux-riscv64-musl')
|
|
408
408
|
const bindingPackageVersion = require('wickra-compile-linux-riscv64-musl/package.json').version
|
|
409
|
-
if (bindingPackageVersion !== '0.1.
|
|
410
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
409
|
+
if (bindingPackageVersion !== '0.1.2' && 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.1.2 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('wickra-compile-linux-riscv64-gnu')
|
|
424
424
|
const bindingPackageVersion = require('wickra-compile-linux-riscv64-gnu/package.json').version
|
|
425
|
-
if (bindingPackageVersion !== '0.1.
|
|
426
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
425
|
+
if (bindingPackageVersion !== '0.1.2' && 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.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
427
427
|
}
|
|
428
428
|
return binding
|
|
429
429
|
} catch (e) {
|
|
@@ -439,8 +439,8 @@ function requireNative() {
|
|
|
439
439
|
try {
|
|
440
440
|
const binding = require('wickra-compile-linux-ppc64-gnu')
|
|
441
441
|
const bindingPackageVersion = require('wickra-compile-linux-ppc64-gnu/package.json').version
|
|
442
|
-
if (bindingPackageVersion !== '0.1.
|
|
443
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
442
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
443
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
444
444
|
}
|
|
445
445
|
return binding
|
|
446
446
|
} catch (e) {
|
|
@@ -455,8 +455,8 @@ function requireNative() {
|
|
|
455
455
|
try {
|
|
456
456
|
const binding = require('wickra-compile-linux-s390x-gnu')
|
|
457
457
|
const bindingPackageVersion = require('wickra-compile-linux-s390x-gnu/package.json').version
|
|
458
|
-
if (bindingPackageVersion !== '0.1.
|
|
459
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
458
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
459
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
460
460
|
}
|
|
461
461
|
return binding
|
|
462
462
|
} catch (e) {
|
|
@@ -475,8 +475,8 @@ function requireNative() {
|
|
|
475
475
|
try {
|
|
476
476
|
const binding = require('wickra-compile-openharmony-arm64')
|
|
477
477
|
const bindingPackageVersion = require('wickra-compile-openharmony-arm64/package.json').version
|
|
478
|
-
if (bindingPackageVersion !== '0.1.
|
|
479
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
478
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
479
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
480
480
|
}
|
|
481
481
|
return binding
|
|
482
482
|
} catch (e) {
|
|
@@ -491,8 +491,8 @@ function requireNative() {
|
|
|
491
491
|
try {
|
|
492
492
|
const binding = require('wickra-compile-openharmony-x64')
|
|
493
493
|
const bindingPackageVersion = require('wickra-compile-openharmony-x64/package.json').version
|
|
494
|
-
if (bindingPackageVersion !== '0.1.
|
|
495
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
494
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
495
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
496
496
|
}
|
|
497
497
|
return binding
|
|
498
498
|
} catch (e) {
|
|
@@ -507,8 +507,8 @@ function requireNative() {
|
|
|
507
507
|
try {
|
|
508
508
|
const binding = require('wickra-compile-openharmony-arm')
|
|
509
509
|
const bindingPackageVersion = require('wickra-compile-openharmony-arm/package.json').version
|
|
510
|
-
if (bindingPackageVersion !== '0.1.
|
|
511
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
510
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
511
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
512
512
|
}
|
|
513
513
|
return binding
|
|
514
514
|
} catch (e) {
|
|
@@ -647,8 +647,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
647
647
|
if (!candidateFailed) {
|
|
648
648
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
649
649
|
const bindingPackageVersion = require('wickra-compile-wasm32-wasi/package.json').version
|
|
650
|
-
if (bindingPackageVersion !== '0.1.
|
|
651
|
-
throw new Error(`WASI binding package version mismatch, expected 0.1.
|
|
650
|
+
if (bindingPackageVersion !== '0.1.2') {
|
|
651
|
+
throw new Error(`WASI binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
654
|
wasiBinding = require('wickra-compile-wasm32-wasi')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wickra-compile",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Compile a Wickra strategy spec into a standalone deployable (WASM, binary, or no_std) with a deterministic manifest. Node bindings powered by Rust.",
|
|
5
5
|
"author": "kingchenc <support@wickra.org>",
|
|
6
6
|
"main": "index.js",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"node": ">= 22"
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"wickra-compile-linux-x64-gnu": "0.1.
|
|
51
|
-
"wickra-compile-linux-arm64-gnu": "0.1.
|
|
52
|
-
"wickra-compile-darwin-x64": "0.1.
|
|
53
|
-
"wickra-compile-darwin-arm64": "0.1.
|
|
54
|
-
"wickra-compile-win32-x64-msvc": "0.1.
|
|
55
|
-
"wickra-compile-win32-arm64-msvc": "0.1.
|
|
50
|
+
"wickra-compile-linux-x64-gnu": "0.1.2",
|
|
51
|
+
"wickra-compile-linux-arm64-gnu": "0.1.2",
|
|
52
|
+
"wickra-compile-darwin-x64": "0.1.2",
|
|
53
|
+
"wickra-compile-darwin-arm64": "0.1.2",
|
|
54
|
+
"wickra-compile-win32-x64-msvc": "0.1.2",
|
|
55
|
+
"wickra-compile-win32-arm64-msvc": "0.1.2"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "napi build --platform --release",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|