The first language stecker on the C ABI hub: a .NET binding exposing all 514 indicators as idiomatic `IDisposable` classes, generated from `wickra.h`. ## What's here - **`bindings/csharp/`** — the `Wickra` .NET 8 package. `[LibraryImport]` source-generated P/Invoke (`NativeMethods.g.cs`) plus idiomatic wrappers (`Indicators.g.cs`), both generated from the committed `bindings/c/include/wickra.h`. The binding owns no indicator maths — it only marshals types across the C ABI. - **Marshalling, verified end-to-end against the native library.** Opaque handles cross as `nint` kept alive per call via a `SafeHandle`; `bool` as `[MarshalAs(U1)]` (Rust `bool` is one byte); a self-correcting `DllImportResolver` validates the loaded library actually exports the Wickra ABI. Tests cover one representative per FFI archetype (scalar, candle, pairwise, multi-output, bars, profile, values-profile, order-book / array-input) plus exact Sma reference values. - **NuGet packaging** — `dotnet pack` produces `Wickra.<version>.nupkg`; the release pipeline stages prebuilt native libraries under `runtimes/<rid>/native/` for six target triples (win/linux/osx × x64/arm64). - **`examples/csharp/`** — nine examples mirroring `examples/c/`: streaming, backtest, multi_timeframe, parallel_assets, three strategies, and fetch_btcusdt + live_binance. - **CI** — a `csharp` job on the three OSes builds the C ABI, tests the binding, and runs the offline examples. **Release** — a gated `csharp-publish` job packs and pushes to NuGet (gated on `NUGET_API_KEY`, independent of the GitHub-release job so a C# hiccup never blocks the C/C++ asset release). - **Docs consistency wave** — README, CONTRIBUTING, CHANGELOG, examples/README, the issue / PR templates, `sync-about.yml`, and `.gitattributes`. The native Python / Node / WASM bindings and the C ABI are untouched; this is additive. Publishing to NuGet stays gated behind the release tag and the secret.
70 lines
2.1 KiB
Markdown
70 lines
2.1 KiB
Markdown
<!--
|
||
Thanks for contributing to Wickra!
|
||
Please fill in the sections below. Delete any that don't apply.
|
||
-->
|
||
|
||
## Summary
|
||
|
||
<!-- 1–3 sentences: what does this PR change and why? -->
|
||
|
||
## Type of change
|
||
|
||
- [ ] Bug fix (Non-breaking change which fixes an issue)
|
||
- [ ] New feature (Non-breaking change which adds functionality)
|
||
- [ ] Breaking change (Fix or feature that changes existing public API)
|
||
- [ ] Performance improvement
|
||
- [ ] Refactor (No functional change)
|
||
- [ ] Documentation only
|
||
- [ ] CI / build / tooling
|
||
|
||
## Affected surfaces
|
||
|
||
- [ ] Rust crate (`crates/wickra`)
|
||
- [ ] Python binding (`bindings/python`)
|
||
- [ ] Node.js binding (`bindings/node`)
|
||
- [ ] WebAssembly binding (`bindings/wasm`)
|
||
- [ ] C ABI (`bindings/c`)
|
||
- [ ] C# / .NET binding (`bindings/csharp`)
|
||
- [ ] Examples / docs
|
||
|
||
## Linked issues
|
||
|
||
<!-- "Closes #123", "Refs #456". One per line. -->
|
||
|
||
Closes #
|
||
|
||
## How was this tested?
|
||
|
||
<!--
|
||
- Unit tests added / updated under `crates/*/tests/` or `bindings/*/tests/`
|
||
- Property / fuzz tests touched? (Under `fuzz/`)
|
||
- Manual repro steps, if applicable
|
||
- Benchmarks run (Paste before/after if perf-sensitive)
|
||
-->
|
||
|
||
## Numerical correctness (If you touched an indicator)
|
||
|
||
- [ ] Output matches an existing reference (TA-Lib, paper, prior Wickra release) within documented tolerance
|
||
- [ ] Streaming `update()` matches batch / `from_slice` output on the same input
|
||
- [ ] Edge cases covered: empty input, single point, NaN, leading warm-up window
|
||
|
||
## Performance impact (If applicable)
|
||
|
||
| Benchmark | Before | After | Δ |
|
||
| --------- | ------ | ----- | - |
|
||
| | | | |
|
||
|
||
## Checklist
|
||
|
||
- [ ] `cargo fmt --all` and `cargo clippy --all-targets -- -D warnings` are clean
|
||
- [ ] `cargo test --workspace` passes locally
|
||
- [ ] Binding tests run (If a binding changed)
|
||
- [ ] Public API changes are reflected in `CHANGELOG.md`
|
||
- [ ] Public API changes are reflected in rustdoc / README / examples
|
||
- [ ] No `todo*.md` or other local-only notes are staged
|
||
- [ ] License header / `LICENSE` reference unchanged (MIT OR Apache-2.0)
|
||
|
||
## Notes for reviewers
|
||
|
||
<!-- Anything reviewers should look at first, known follow-ups, deliberately out-of-scope items. -->
|