Adds an R binding (`bindings/r`) over the C ABI hub — the third language stecker after C# and Go, reaching the hub through R's native `.Call` interface (not extendr). ## What's here - **`bindings/r`** — an R package exposing all 514 indicators as constructors that return a `wickra_indicator` object with generic `update`/`batch`/`reset` methods. The C glue (`src/wickra.c`) and R wrappers (`R/indicators.R`) are generated from `bindings/c/include/wickra.h` (same archetype taxonomy as the C#/Go generators: scalar/batch, multi-output, bars, profile, profile-values, array-input). The opaque handle is an R external pointer freed by a registered finalizer; multi-output returns a named vector (`NA` at warmup), bars a matrix, profiles a list. - **`examples/r`** — the full example suite mirroring C/C#/Go: streaming, backtest, multi_timeframe, parallel_assets (`mclapply`), three strategies, and `fetch_btcusdt`/`live_binance`. - **CI** — an `r` job builds the C ABI library, installs the package, runs the `testthat` suite and the offline examples on Linux, macOS and Windows (`R CMD check` is clean: 0 warnings, 0 notes). - **Docs** — R added to the README languages table, project layout, building/testing, CONTRIBUTING binding table + regenerate note, ARCHITECTURE, examples index, issue/PR templates, the About-description template, and the other binding READMEs. ## Linking / distribution The package compiles a thin `.Call` glue layer against the prebuilt C ABI library (header via `WICKRA_INCLUDE_DIR`, library via `WICKRA_LIB_DIR`). On Windows the package's own `wickra.dll` would collide with the C ABI's `wickra.dll`, so `configure.win` stages a renamed copy (`wickra_abi.dll`) and builds an import library referencing it; `install.libs.R` bundles the DLL and `.onLoad` puts it on the load path. On Linux/macOS the rpath locates the shared library. No `release.yml` change — R is distributed via r-universe / source install (gated). No Rust crate or `Cargo.toml` change — the R package is standalone and additive.
72 lines
2.2 KiB
Markdown
72 lines
2.2 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`)
|
||
- [ ] Go binding (`bindings/go`)
|
||
- [ ] R binding (`bindings/r`)
|
||
- [ ] 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. -->
|