wickra-benchmark-wasm 0.1.2 → 0.1.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 +63 -7
- package/package.json +1 -1
- package/wickra_benchmark_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
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 Benchmark — a reproducible, golden-verified benchmark suite for quant backtests, recomputable byte-for-byte in ten languages" width="100%"></a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
[](https://github.com/wickra-lib/wickra-benchmark/actions/workflows/ci.yml)
|
|
6
|
+
[](https://codecov.io/gh/wickra-lib/wickra-benchmark)
|
|
7
|
+
[](https://www.npmjs.com/package/wickra-benchmark-wasm)
|
|
8
|
+
[](https://github.com/wickra-lib/wickra-benchmark#license)
|
|
9
|
+
|
|
1
10
|
# Wickra Benchmark — WASM
|
|
2
11
|
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
**Part of the [Wickra ecosystem](https://github.com/wickra-lib) — for WASM. `npm install wickra-benchmark-wasm` — pure WebAssembly, runs anywhere a modern JS engine does.**
|
|
15
|
+
|
|
3
16
|
Recompute a curated benchmark case or suite with the deterministic Wickra engine
|
|
4
17
|
and confirm its report and hash, compiled to WebAssembly for the browser (and
|
|
5
18
|
any WASM host). Built with [wasm-bindgen].
|
|
@@ -8,7 +21,13 @@ The suite runs sequentially under WASM (no thread pool in a browser sandbox),
|
|
|
8
21
|
which is byte-identical to the native parallel run — the exact cross-language
|
|
9
22
|
golden check.
|
|
10
23
|
|
|
11
|
-
##
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install wickra-benchmark-wasm
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Building from this repository (contributors)
|
|
12
31
|
|
|
13
32
|
```sh
|
|
14
33
|
wasm-pack build --target web # for browsers / bundlers
|
|
@@ -18,13 +37,13 @@ wasm-pack build --target nodejs # for Node.js
|
|
|
18
37
|
The `pkg/` output (the `.wasm` binary plus the JS glue and TypeScript types) is
|
|
19
38
|
generated, not committed.
|
|
20
39
|
|
|
21
|
-
##
|
|
40
|
+
## Quick start
|
|
22
41
|
|
|
23
42
|
Everything goes through a `Benchmark` driven by JSON commands — the same command
|
|
24
43
|
protocol every Wickra binding shares.
|
|
25
44
|
|
|
26
45
|
```js
|
|
27
|
-
import init, { Benchmark } from "
|
|
46
|
+
import init, { Benchmark } from "wickra-benchmark-wasm";
|
|
28
47
|
|
|
29
48
|
await init(); // load the .wasm module (web target)
|
|
30
49
|
|
|
@@ -46,7 +65,7 @@ const result = JSON.parse(bench.command(JSON.stringify(runCase)));
|
|
|
46
65
|
console.log(result.passed && result.hash_match ? "passed" : "failed");
|
|
47
66
|
```
|
|
48
67
|
|
|
49
|
-
|
|
68
|
+
### Commands
|
|
50
69
|
|
|
51
70
|
| `cmd` | Payload | Response |
|
|
52
71
|
|---------------|---------------------|-----------------------------------------|
|
|
@@ -61,8 +80,45 @@ array.
|
|
|
61
80
|
Domain errors (a bad case, an unknown command) come back in-band as
|
|
62
81
|
`{ok:false,error:...}`; a malformed command envelope throws a JS error.
|
|
63
82
|
|
|
64
|
-
##
|
|
83
|
+
## Benchmark
|
|
84
|
+
|
|
85
|
+
Every binding forwards to the same data-driven Rust core, so what this one adds is
|
|
86
|
+
the call overhead of wasm-bindgen, not a different result. The core's throughput is
|
|
87
|
+
measured by the repository's benchmark suite and the nightly `bench.yml` run; the
|
|
88
|
+
numbers, the machine and how to reproduce them are in the repository
|
|
89
|
+
[BENCHMARKS.md](https://github.com/wickra-lib/wickra-benchmark/blob/main/BENCHMARKS.md).
|
|
65
90
|
|
|
66
|
-
|
|
91
|
+
## Documentation
|
|
92
|
+
|
|
93
|
+
The full guide, the spec reference and the API documentation live in the main
|
|
94
|
+
repository and the documentation site:
|
|
95
|
+
|
|
96
|
+
- **Repository:** <https://github.com/wickra-lib/wickra-benchmark>
|
|
97
|
+
- **Docs** (guides, spec reference, cookbook): <https://benchmark.wickra.org>
|
|
98
|
+
- **Runnable example:** [`examples/wasm/`](https://github.com/wickra-lib/wickra-benchmark/tree/main/examples/wasm)
|
|
99
|
+
|
|
100
|
+
Wickra Benchmark ships native bindings for Python, Node.js, WASM and Rust, plus a C ABI hub that any
|
|
101
|
+
C-capable language (C, C++, C#, Go, Java, R) links against — all forwarding to the
|
|
102
|
+
same data-driven, `unsafe`-forbidden Rust core.
|
|
103
|
+
|
|
104
|
+
## Security
|
|
105
|
+
|
|
106
|
+
Found a security issue? **Please don't open a public issue.** Report it privately
|
|
107
|
+
via the repository's *Security* tab (*"Report a vulnerability"*) or email
|
|
108
|
+
**support@wickra.org** with a subject line starting `[wickra security]`. Full
|
|
109
|
+
policy: <https://github.com/wickra-lib/wickra-benchmark/blob/main/SECURITY.md>.
|
|
110
|
+
|
|
111
|
+
## Disclaimer
|
|
112
|
+
|
|
113
|
+
`wickra-benchmark` is research and engineering tooling, not financial advice. A
|
|
114
|
+
passing case attests only that a report is the deterministic result of a given
|
|
115
|
+
strategy over given data — it makes no claim about the quality, profitability or
|
|
116
|
+
future performance of any strategy, nor about whether the data is representative
|
|
117
|
+
of any market. Trading carries risk; you are responsible for your own decisions.
|
|
118
|
+
`wickra-benchmark` is free software you run yourself: no hosted service, no data
|
|
119
|
+
collection, no warranty.
|
|
120
|
+
|
|
121
|
+
## License
|
|
67
122
|
|
|
68
|
-
[
|
|
123
|
+
Licensed under either of [Apache-2.0](https://github.com/wickra-lib/wickra-benchmark/blob/main/LICENSE-APACHE)
|
|
124
|
+
or [MIT](https://github.com/wickra-lib/wickra-benchmark/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-benchmark — recompute a curated case or suite and confirm its report and hash, in the browser.",
|
|
8
|
-
"version": "0.1.
|
|
8
|
+
"version": "0.1.3",
|
|
9
9
|
"license": "MIT OR Apache-2.0",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
Binary file
|