wickra-strategy-ci-wasm 0.1.2 → 0.1.4
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 +61 -8
- package/package.json +1 -1
- package/wickra_strategy_ci_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -1,11 +1,30 @@
|
|
|
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-7" alt="Wickra Strategy-CI — golden-pin your strategy's backtest report, catch regressions in CI, and property-test against fuzzed data, in ten languages plus a reusable GitHub Action" width="100%"></a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
[](https://github.com/wickra-lib/wickra-strategy-ci/actions/workflows/ci.yml)
|
|
6
|
+
[](https://codecov.io/gh/wickra-lib/wickra-strategy-ci)
|
|
7
|
+
[](https://www.npmjs.com/package/wickra-strategy-ci-wasm)
|
|
8
|
+
[](https://github.com/wickra-lib/wickra-strategy-ci#license)
|
|
9
|
+
|
|
1
10
|
# Wickra Strategy-CI — WASM
|
|
2
11
|
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
**Jest for trading strategies — for WASM. `npm install wickra-strategy-ci-wasm` — pure WebAssembly, runs anywhere a modern JS engine does.**
|
|
15
|
+
|
|
3
16
|
WebAssembly bindings for the Wickra Strategy-CI test runner, compiled from Rust
|
|
4
17
|
with [wasm-bindgen](https://wasm-bindgen.github.io/wasm-bindgen/). A `Session` drives
|
|
5
18
|
the deterministic core over a JSON boundary, so a browser front-end runs against
|
|
6
19
|
the exact same core as every other Wickra Strategy-CI binding.
|
|
7
20
|
|
|
8
|
-
##
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install wickra-strategy-ci-wasm
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Building from this repository (contributors)
|
|
9
28
|
|
|
10
29
|
```bash
|
|
11
30
|
wasm-pack build --target web # for a browser bundler
|
|
@@ -14,10 +33,10 @@ wasm-pack build --target nodejs # for node:test / Node.js
|
|
|
14
33
|
|
|
15
34
|
The output lands in `pkg/`.
|
|
16
35
|
|
|
17
|
-
##
|
|
36
|
+
## Quick start
|
|
18
37
|
|
|
19
38
|
```js
|
|
20
|
-
import init, { Session } from "
|
|
39
|
+
import init, { Session } from "wickra-strategy-ci-wasm";
|
|
21
40
|
|
|
22
41
|
await init();
|
|
23
42
|
const session = new Session();
|
|
@@ -35,7 +54,7 @@ const result = JSON.parse(response);
|
|
|
35
54
|
console.assert(result.passed);
|
|
36
55
|
```
|
|
37
56
|
|
|
38
|
-
|
|
57
|
+
### Surface
|
|
39
58
|
|
|
40
59
|
- **`new Session()`** — a stateless test session; tests and data are passed with
|
|
41
60
|
each command.
|
|
@@ -48,18 +67,52 @@ console.assert(result.passed);
|
|
|
48
67
|
Internal errors come back as an `{"ok": false, "error": ...}` response, not as a
|
|
49
68
|
thrown exception.
|
|
50
69
|
|
|
51
|
-
|
|
70
|
+
### Determinism
|
|
52
71
|
|
|
53
72
|
The backtest engine runs sequentially in the browser sandbox (no rayon thread
|
|
54
73
|
pool), which is byte-identical to the native run — the exact cross-language
|
|
55
74
|
golden invariant. The response bytes match every other binding.
|
|
56
75
|
|
|
57
|
-
##
|
|
76
|
+
## Benchmark
|
|
77
|
+
|
|
78
|
+
Every binding forwards to the same data-driven Rust core, so what this one adds is
|
|
79
|
+
the call overhead of wasm-bindgen, not a different result. The core's throughput is
|
|
80
|
+
measured by the repository's benchmark suite and the nightly `bench.yml` run; the
|
|
81
|
+
numbers, the machine and how to reproduce them are in the repository
|
|
82
|
+
[BENCHMARKS.md](https://github.com/wickra-lib/wickra-strategy-ci/blob/main/BENCHMARKS.md).
|
|
83
|
+
|
|
84
|
+
## Documentation
|
|
85
|
+
|
|
86
|
+
The full guide, the spec reference and the API documentation live in the main
|
|
87
|
+
repository and the documentation site:
|
|
88
|
+
|
|
89
|
+
- **Repository:** <https://github.com/wickra-lib/wickra-strategy-ci>
|
|
90
|
+
- **Docs** (guides, spec reference, cookbook): <https://strategy-ci.wickra.org>
|
|
91
|
+
- **Runnable example:** [`examples/wasm/`](https://github.com/wickra-lib/wickra-strategy-ci/tree/main/examples/wasm)
|
|
58
92
|
|
|
59
93
|
- The main project: <https://github.com/wickra-lib/wickra-strategy-ci>
|
|
60
94
|
- Documentation: <https://wickra.org>
|
|
61
95
|
|
|
96
|
+
Wickra Strategy-CI ships native bindings for Python, Node.js, WASM and Rust, plus a C ABI hub that any
|
|
97
|
+
C-capable language (C, C++, C#, Go, Java, R) links against — all forwarding to the
|
|
98
|
+
same data-driven, `unsafe`-forbidden Rust core.
|
|
99
|
+
|
|
100
|
+
## Security
|
|
101
|
+
|
|
102
|
+
Found a security issue? **Please don't open a public issue.** Report it privately
|
|
103
|
+
via the repository's *Security* tab (*"Report a vulnerability"*) or email
|
|
104
|
+
**support@wickra.org** with a subject line starting `[wickra security]`. Full
|
|
105
|
+
policy: <https://github.com/wickra-lib/wickra-strategy-ci/blob/main/SECURITY.md>.
|
|
106
|
+
|
|
107
|
+
## Disclaimer
|
|
108
|
+
|
|
109
|
+
`wickra-strategy-ci` is research and engineering tooling, not financial advice. A
|
|
110
|
+
passing test attests only that a strategy's backtest report matches its pinned
|
|
111
|
+
expectation under the given data — it makes no claim about the quality,
|
|
112
|
+
profitability or future performance of any strategy. Trading carries risk; you
|
|
113
|
+
are responsible for your own decisions.
|
|
114
|
+
|
|
62
115
|
## License
|
|
63
116
|
|
|
64
|
-
|
|
65
|
-
[
|
|
117
|
+
Licensed under either of [Apache-2.0](https://github.com/wickra-lib/wickra-strategy-ci/blob/main/LICENSE-APACHE)
|
|
118
|
+
or [MIT](https://github.com/wickra-lib/wickra-strategy-ci/blob/main/LICENSE-MIT) at your option.
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"wickra-lib"
|
|
6
6
|
],
|
|
7
7
|
"description": "WebAssembly bindings for wickra-strategy-ci — golden-pin and regression-test trading strategies in the browser.",
|
|
8
|
-
"version": "0.1.
|
|
8
|
+
"version": "0.1.4",
|
|
9
9
|
"license": "MIT OR Apache-2.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
Binary file
|