wickra-wasm 0.7.5 → 0.7.7
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 +42 -21
- package/package.json +1 -1
- package/wickra_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -2,24 +2,25 @@
|
|
|
2
2
|
<a href="https://wickra.org"><img src="https://raw.githubusercontent.com/wickra-lib/.github/main/profile/wickra-banner.webp?v=514" alt="Wickra — streaming-first technical indicators" width="100%"></a>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
[](https://github.com/wickra-lib/wickra/actions/workflows/ci.yml)
|
|
6
|
+
[](https://github.com/wickra-lib/wickra/actions/workflows/codeql.yml)
|
|
7
|
+
[](https://codecov.io/gh/wickra-lib/wickra)
|
|
8
|
+
[](https://github.com/wickra-lib/wickra/releases/latest)
|
|
9
|
+
[](https://crates.io/crates/wickra)
|
|
10
|
+
[](https://pypi.org/project/wickra/)
|
|
11
|
+
[](https://www.npmjs.com/package/wickra)
|
|
12
|
+
[](https://www.nuget.org/packages/Wickra)
|
|
13
|
+
[](#license)
|
|
14
|
+
[](https://scorecard.dev/viewer/?uri=github.com/wickra-lib/wickra)
|
|
15
|
+
[](https://www.bestpractices.dev/projects/13094)
|
|
16
|
+
[](https://github.com/wickra-lib/wickra/attestations)
|
|
17
|
+
[](https://docs.wickra.org)
|
|
17
18
|
|
|
18
19
|
**Streaming-first technical indicators. Install with `pip install wickra` — no system dependencies.**
|
|
19
20
|
|
|
20
21
|
Wickra is a multi-language technical-analysis library with a Rust core and
|
|
21
|
-
native bindings for Python, Node.js and WebAssembly, plus a C ABI that
|
|
22
|
-
C
|
|
22
|
+
native bindings for Python, Node.js and WebAssembly, plus a C ABI that C, C++,
|
|
23
|
+
C# / .NET, Go and any other C-capable language links against. Every indicator is a
|
|
23
24
|
state machine that updates in O(1) per new data point, so live trading bots and
|
|
24
25
|
historical backtests share the exact same implementation.
|
|
25
26
|
|
|
@@ -47,7 +48,10 @@ Full documentation lives at **[docs.wickra.org](https://docs.wickra.org)**:
|
|
|
47
48
|
- **Quickstarts** — [Rust](https://docs.wickra.org/Quickstart-Rust),
|
|
48
49
|
[Python](https://docs.wickra.org/Quickstart-Python),
|
|
49
50
|
[Node](https://docs.wickra.org/Quickstart-Node),
|
|
50
|
-
[WASM](https://docs.wickra.org/Quickstart-WASM)
|
|
51
|
+
[WASM](https://docs.wickra.org/Quickstart-WASM),
|
|
52
|
+
[C](https://docs.wickra.org/Quickstart-C),
|
|
53
|
+
[C#](https://docs.wickra.org/Quickstart-CSharp),
|
|
54
|
+
[Go](https://docs.wickra.org/Quickstart-Go).
|
|
51
55
|
- **Indicators** — a per-indicator deep dive (formula, parameters, warmup) for
|
|
52
56
|
every one of the 514 indicators; start at the
|
|
53
57
|
[indicators overview](https://docs.wickra.org/Indicators-Overview).
|
|
@@ -73,7 +77,7 @@ times to get there.
|
|
|
73
77
|
metrics — every single one updating in **O(1) per tick**. TA-Lib ships ~150 and
|
|
74
78
|
none of them stream.
|
|
75
79
|
- **One Rust core, five first-class targets.** Native **Python · Node.js ·
|
|
76
|
-
WebAssembly · Rust** plus a **C ABI** for C / C
|
|
80
|
+
WebAssembly · Rust** plus a **C ABI** for C / C++, C# / .NET, Go and any other C-capable language —
|
|
77
81
|
identical math, identical results, zero per-language reimplementation and zero
|
|
78
82
|
GIL bottleneck.
|
|
79
83
|
- **Correct by construction, not by hope.** Every `update` validates its input,
|
|
@@ -97,7 +101,8 @@ Every other library forces one of those compromises. Wickra doesn't:
|
|
|
97
101
|
|
|
98
102
|
| Library | Install | Streaming | Languages | Indicators | Active |
|
|
99
103
|
|------------------|-------------|-------------|-----------------------------|-----------:|--------|
|
|
100
|
-
| **★ Wickra**| **clean** | **yes, O(1)** | **Python · Node · WASM
|
|
104
|
+
| **★ Wickra**| **clean** | **yes, O(1)** | **Rust · Python · Node · WASM** | **514** | **yes** |
|
|
105
|
+
| | | | **C · C# · Go** | | |
|
|
101
106
|
| kand | clean | yes | Python · WASM · Rust | ~60 | yes |
|
|
102
107
|
| ta-rs | clean | yes | Rust only | ~30 | stale |
|
|
103
108
|
| yata | clean | partial | Rust only | ~35 | yes |
|
|
@@ -168,8 +173,9 @@ as one column each. `Doji` is direction-less by default (`+1.0` / `0.0`);
|
|
|
168
173
|
construct it in signed mode (`Doji::new().signed()`, `Doji(signed=True)`,
|
|
169
174
|
`new Doji(true)`) for a dragonfly / gravestone `±1` reading.
|
|
170
175
|
|
|
171
|
-
Adding a new indicator means implementing one trait in Rust;
|
|
172
|
-
|
|
176
|
+
Adding a new indicator means implementing one trait in Rust; every binding
|
|
177
|
+
inherits it automatically (the C ABI — and the C# and Go bindings generated from
|
|
178
|
+
it — regenerate from the core).
|
|
173
179
|
|
|
174
180
|
## Languages
|
|
175
181
|
|
|
@@ -180,6 +186,8 @@ inherit it automatically (the C ABI is generated from the core).
|
|
|
180
186
|
| Browser / WASM | `npm install wickra-wasm` | `examples/wasm/index.html` |
|
|
181
187
|
| Rust | `cargo add wickra` | `examples/rust/src/bin/backtest.rs` |
|
|
182
188
|
| C / C++ (C ABI) | header + library, see [`bindings/c`](bindings/c) | `examples/c/streaming.c` |
|
|
189
|
+
| C# / .NET (C ABI) | `dotnet add package Wickra`, see [`bindings/csharp`](bindings/csharp) | `examples/csharp/streaming` |
|
|
190
|
+
| Go (cgo, C ABI) | `go get github.com/wickra-lib/wickra/bindings/go`, see [`bindings/go`](bindings/go) | `examples/go/streaming` |
|
|
183
191
|
|
|
184
192
|
Each binding ships several runnable examples (streaming, backtest, live feed);
|
|
185
193
|
[`examples/README.md`](examples/README.md) is the full cross-language index.
|
|
@@ -249,14 +257,18 @@ wickra/
|
|
|
249
257
|
│ ├── python/ PyO3 + maturin (publishes on PyPI)
|
|
250
258
|
│ ├── node/ napi-rs (publishes on npm)
|
|
251
259
|
│ ├── wasm/ wasm-bindgen (browsers, bundlers, Node)
|
|
252
|
-
│
|
|
260
|
+
│ ├── c/ C ABI (cdylib + staticlib) + generated include/wickra.h
|
|
261
|
+
│ ├── csharp/ .NET binding over the C ABI (publishes on NuGet)
|
|
262
|
+
│ └── go/ Go binding over the C ABI via cgo (module tag)
|
|
253
263
|
├── examples/ examples/README.md indexes every language
|
|
254
264
|
│ ├── data/ real BTCUSDT OHLCV datasets, one per timeframe
|
|
255
265
|
│ ├── rust/ Rust workspace member (`wickra-examples`)
|
|
256
266
|
│ ├── python/ backtest, live trading, parallel assets, multi-tf
|
|
257
267
|
│ ├── node/ streaming, backtest, live trading (load `wickra`)
|
|
258
268
|
│ ├── wasm/ browser demo for `wickra-wasm`
|
|
259
|
-
│
|
|
269
|
+
│ ├── c/ C smoke + streaming, C++ RAII wrapper
|
|
270
|
+
│ ├── csharp/ streaming, backtest, strategies (load `Wickra`)
|
|
271
|
+
│ └── go/ streaming, backtest, strategies (cgo binding)
|
|
260
272
|
└── .github/workflows/ CI and release pipelines
|
|
261
273
|
```
|
|
262
274
|
|
|
@@ -289,6 +301,13 @@ cd bindings/node && npm install && npm run build && npm test
|
|
|
289
301
|
cargo build -p wickra-c --release
|
|
290
302
|
cmake -S examples/c -B examples/c/build -DWICKRA_LIB_DIR="$PWD/target/release"
|
|
291
303
|
cmake --build examples/c/build && ctest --test-dir examples/c/build --output-on-failure
|
|
304
|
+
|
|
305
|
+
# C# / .NET binding (requires the .NET 8 SDK; links the C ABI above)
|
|
306
|
+
dotnet test bindings/csharp/Wickra.Tests/Wickra.Tests.csproj
|
|
307
|
+
|
|
308
|
+
# Go binding (requires a C compiler for cgo; links the C ABI above)
|
|
309
|
+
cp target/release/libwickra.so bindings/go/lib/ # .dylib on macOS, wickra.dll on Windows
|
|
310
|
+
cd bindings/go && go test ./...
|
|
292
311
|
```
|
|
293
312
|
|
|
294
313
|
## Testing
|
|
@@ -308,6 +327,8 @@ Every layer is covered; run the suites with the commands in
|
|
|
308
327
|
values across all indicators.
|
|
309
328
|
- `bindings/wasm`: `wasm-bindgen-test` cases for constructors, equivalence,
|
|
310
329
|
and reference values.
|
|
330
|
+
- `bindings/go`: `go test` cases covering one indicator per FFI archetype
|
|
331
|
+
(scalar/batch, multi-output, bars, profile, array input), reset, and lifecycle.
|
|
311
332
|
|
|
312
333
|
## Contributing
|
|
313
334
|
|
package/package.json
CHANGED
package/wickra_wasm_bg.wasm
CHANGED
|
Binary file
|