Jest for trading strategies — for R. install.packages("wickrastrategyci", repos = "https://wickra-lib.r-universe.dev") — over the C ABI via .Call, prebuilt library fetched on install.
R bindings for the Wickra Strategy-CI test runner over its C ABI hub, via .Call.
A session drives the deterministic core over a JSON boundary, so the result is
byte-identical to every other Wickra Strategy-CI binding.
From r-universe:
install.packages("wickrastrategyci", repos = "https://wickra-lib.r-universe.dev")
The package's configure downloads the prebuilt C ABI library for this exact
version from the GitHub release and bundles it, so an ordinary install needs
nothing but a C toolchain (Rtools on Windows) for the thin .Call glue layer. To
build against a local checkout instead, point it at the header and library with
the environment variables below.
The C ABI header and shared library are provided out-of-tree through two environment variables (set by CI / the installer):
export WKSTRATEGYCI_INC=/path/to/bindings/c/include # the header dir
export WKSTRATEGYCI_LIB=/path/to/target/release # the library dir
R CMD INSTALL bindings/r
Rscript bindings/r/tests/run_tests.R
At run time the loader must find the shared library on LD_LIBRARY_PATH
(Linux), DYLD_LIBRARY_PATH (macOS) or PATH (Windows).
library(wickrastrategyci)
session <- wkstrategyci_new()
response <- wkstrategyci_command(session, '{"cmd":"run_test","test":{ },"data":{ }}')
cat(response)
wkstrategyci_new() — create a stateless test session (an external
pointer; freed by a finalizer). Tests and data are passed with each command.wkstrategyci_command(session, cmd_json) — run a command envelope
({"cmd":"...", ...}) and return the response JSON. Commands: run_test,
bless, run_suite, list, version.wkstrategyci_version() — the crate version.Internal errors come back as an {"ok": false, "error": ...} response, not as an
R error.
The response bytes are identical across languages and between the parallel and sequential execution paths, because the whole test runner lives once in the Rust core and this binding forwards its JSON verbatim.
Every binding forwards to the same data-driven Rust core, so what this one adds is
the call overhead of R's native .Call interface over the C ABI, not a different result. The core's throughput is
measured by the repository's benchmark suite and the nightly bench.yml run; the
numbers, the machine and how to reproduce them are in the repository
BENCHMARKS.md.
The full guide, the spec reference and the API documentation live in the main repository and the documentation site:
Repository: https://github.com/wickra-lib/wickra-strategy-ci
Docs (guides, spec reference, cookbook): https://strategy-ci.wickra.org
Runnable example: examples/r/
The main project: https://github.com/wickra-lib/wickra-strategy-ci
Documentation: https://wickra.org
Wickra Strategy-CI ships native bindings for Python, Node.js, WASM and Rust, plus a C ABI hub that any
C-capable language (C, C++, C#, Go, Java, R) links against — all forwarding to the
same data-driven, unsafe-forbidden Rust core.
Found a security issue? Please don't open a public issue. Report it privately
via the repository's Security tab ("Report a vulnerability") or email
support@wickra.org with a subject line starting [wickra security]. Full
policy: https://github.com/wickra-lib/wickra-strategy-ci/blob/main/SECURITY.md.
wickra-strategy-ci is research and engineering tooling, not financial advice. A
passing test attests only that a strategy's backtest report matches its pinned
expectation under the given data — it makes no claim about the quality,
profitability or future performance of any strategy. Trading carries risk; you
are responsible for your own decisions.
Licensed under either of Apache-2.0 or MIT at your option.