wickra-shazam-wasm 0.1.0 → 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 +63 -5
- package/package.json +1 -1
- package/wickra_shazam_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
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 Shazam — match an asset's current microstructure fingerprint against its entire history" width="100%"></a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
[](https://github.com/wickra-lib/wickra-shazam/actions/workflows/ci.yml)
|
|
6
|
+
[](https://codecov.io/gh/wickra-lib/wickra-shazam)
|
|
7
|
+
[](https://www.npmjs.com/package/wickra-shazam-wasm)
|
|
8
|
+
[](https://github.com/wickra-lib/wickra-shazam#license)
|
|
9
|
+
|
|
1
10
|
# Wickra Shazam — WASM
|
|
2
11
|
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
> **▶ Live demo:** all 514 indicators over real Binance market data, computed live in your browser — **[live.wickra.org](https://live.wickra.org)** · zero backend, powered by `wickra-wasm`.
|
|
15
|
+
|
|
16
|
+
**Point at live data → "that's the May-2021 crash setup". Match the current microstructure fingerprint of an asset against its entire history — for WASM. `npm install wickra-shazam-wasm` — pure WebAssembly, runs anywhere a modern JS engine does.**
|
|
17
|
+
|
|
3
18
|
WASM bindings for the `wickra-shazam` data-driven core, compiled to WebAssembly
|
|
4
19
|
with wasm-bindgen. Build a `Shazam` from a spec JSON, drive it with command JSON,
|
|
5
20
|
read back match reports — the same protocol as every other binding, running in
|
|
@@ -9,7 +24,13 @@ The core is built with `--no-default-features`, so indexing and matching run
|
|
|
9
24
|
**sequentially** (no rayon thread pool in the browser sandbox) and are
|
|
10
25
|
byte-identical to the native parallel path.
|
|
11
26
|
|
|
12
|
-
##
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install wickra-shazam-wasm
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Building from this repository (contributors)
|
|
13
34
|
|
|
14
35
|
```bash
|
|
15
36
|
wasm-pack build --target web
|
|
@@ -17,10 +38,10 @@ wasm-pack build --target web
|
|
|
17
38
|
|
|
18
39
|
This emits `pkg/` with the `.wasm` module and JS glue.
|
|
19
40
|
|
|
20
|
-
##
|
|
41
|
+
## Quick start
|
|
21
42
|
|
|
22
43
|
```js
|
|
23
|
-
import init, { Shazam, version } from "
|
|
44
|
+
import init, { Shazam, version } from "wickra-shazam-wasm";
|
|
24
45
|
|
|
25
46
|
await init();
|
|
26
47
|
|
|
@@ -49,7 +70,7 @@ console.log(report.matches.map((m) => m.ts));
|
|
|
49
70
|
console.log(version());
|
|
50
71
|
```
|
|
51
72
|
|
|
52
|
-
|
|
73
|
+
### API
|
|
53
74
|
|
|
54
75
|
| Member | Description |
|
|
55
76
|
|--------|-------------|
|
|
@@ -57,6 +78,43 @@ console.log(version());
|
|
|
57
78
|
| `shazam.command(cmdJson)` | Apply a command JSON, return the response JSON. |
|
|
58
79
|
| `shazam.version()` / `version()` | The library version. |
|
|
59
80
|
|
|
81
|
+
## Benchmark
|
|
82
|
+
|
|
83
|
+
Every binding forwards to the same data-driven Rust core, so what this one adds is
|
|
84
|
+
the call overhead of wasm-bindgen, not a different result. The core's throughput is
|
|
85
|
+
measured by the repository's benchmark suite and the nightly `bench.yml` run; the
|
|
86
|
+
numbers, the machine and how to reproduce them are in the repository
|
|
87
|
+
[BENCHMARKS.md](https://github.com/wickra-lib/wickra-shazam/blob/main/BENCHMARKS.md).
|
|
88
|
+
|
|
89
|
+
## Documentation
|
|
90
|
+
|
|
91
|
+
The full guide, the spec reference and the API documentation live in the main
|
|
92
|
+
repository and the documentation site:
|
|
93
|
+
|
|
94
|
+
- **Repository:** <https://github.com/wickra-lib/wickra-shazam>
|
|
95
|
+
- **Docs** (guides, spec reference, cookbook): <https://shazam.wickra.org>
|
|
96
|
+
- **Runnable example:** [`examples/wasm/`](https://github.com/wickra-lib/wickra-shazam/tree/main/examples/wasm)
|
|
97
|
+
|
|
98
|
+
Wickra Shazam ships native bindings for Python, Node.js, WASM and Rust, plus a C ABI hub that any
|
|
99
|
+
C-capable language (C, C++, C#, Go, Java, R) links against — all forwarding to the
|
|
100
|
+
same data-driven, `unsafe`-forbidden Rust core.
|
|
101
|
+
|
|
102
|
+
## Security
|
|
103
|
+
|
|
104
|
+
Found a security issue? **Please don't open a public issue.** Report it privately
|
|
105
|
+
via the repository's *Security* tab (*"Report a vulnerability"*) or email
|
|
106
|
+
**support@wickra.org** with a subject line starting `[wickra security]`. Full
|
|
107
|
+
policy: <https://github.com/wickra-lib/wickra-shazam/blob/main/SECURITY.md>.
|
|
108
|
+
|
|
109
|
+
## Disclaimer
|
|
110
|
+
|
|
111
|
+
Wickra Shazam is analysis software: it computes similarity between market states.
|
|
112
|
+
A historical match is a statistical resemblance, **not a prediction** and **not
|
|
113
|
+
financial advice** — the past setup did not have to repeat, and neither does this
|
|
114
|
+
one. It places no orders. Trading carries risk of loss; review the code and use
|
|
115
|
+
at your own discretion.
|
|
116
|
+
|
|
60
117
|
## License
|
|
61
118
|
|
|
62
|
-
|
|
119
|
+
Licensed under either of [Apache-2.0](https://github.com/wickra-lib/wickra-shazam/blob/main/LICENSE-APACHE)
|
|
120
|
+
or [MIT](https://github.com/wickra-lib/wickra-shazam/blob/main/LICENSE-MIT) at your option.
|
package/package.json
CHANGED
|
Binary file
|