<div class="section-label"><span class="num">05</span> Native Runtime · Advanced</div>
<div class="section-title">One engine. A stable <em>C ABI</em>. Any stack.</div>
Native runtimes are for teams that need **direct, durable integration** — not another language package. CSA ships a licensed Prediction Engine binary; you bind to it through a versioned C application binary interface (ABI) via FFI from the language you already run in production.
Python and R clients use this same contract under the hood. Native runtimes expose it so you can embed the engine in custom services, research stacks, or languages without an official client yet.
> [!note]- Functions, Config, and Results chapters
> The [[Functions/Overview|Functions]], [[Config/Overview|Config]], and [[Results/Overview|Results]] chapters describe the **thin-client** experience (Python, R, and similar). Field nesting, option knobs, and retain helpers there may differ from C symbols and ownership rules. For bindings, pin <span class="mono">rbp_math.h</span> from the C ABI repository and treat that header as authoritative.
<p> </p>
<div class="pillars">
<div class="pillar">
<div class="pillar-num">↳ 01</div>
<div class="pillar-title">Runtime</div>
<div class="pillar-text">Platform shared library plus license tooling — the private engine that actually runs predictions.</div>
</div>
<div class="pillar">
<div class="pillar-num">↳ 02</div>
<div class="pillar-title">C ABI</div>
<div class="pillar-text">A public, versioned call contract: types, ownership, errors, and ABI checks you can bind against with confidence.</div>
</div>
<div class="pillar">
<div class="pillar-num">↳ 03</div>
<div class="pillar-title">FFI</div>
<div class="pillar-text">Call from C, C++, Julia, Rust, or any FFI-capable environment — one interface, thin clients, consistent results.</div>
</div>
</div>
<p> </p>
<div class="section-label"><span class="num">01</span> Public contract</div>
<div class="section-title">The ABI is <em>open</em>. The engine stays private.</div>
The call contract lives in a public GitHub repository so integrators can pin headers, compare <span class="mono">RBP_ABI_VERSION</span> against the loaded binary, and build wrappers without access to engine source.
<div class="solution-list">
<div class="solution-row">
<div class="solution-num">/01</div>
<div class="solution-title">Header</div>
<div class="solution-desc"><span class="mono">rbp_math.h</span> — layouts, status codes, ownership (<span class="mono">*_create</span> / <span class="mono">*_free</span>), and entry points.</div>
<div class="solution-tag">C ABI</div>
</div>
<div class="solution-row">
<div class="solution-num">/02</div>
<div class="solution-title">Versioning</div>
<div class="solution-desc">Match <span class="mono">RBP_ABI_VERSION</span> to <span class="mono">rbp_abi_version()</span> so bindings fail loud on mismatch instead of drifting silently.</div>
<div class="solution-tag">Robust</div>
</div>
<div class="solution-row">
<div class="solution-num">/03</div>
<div class="solution-title">Repository</div>
<div class="solution-desc">Canonical public pin for integrators — not the library source, runtime, or language packages.</div>
<div class="solution-tag">GitHub</div>
</div>
</div>
<div class="btn-row">
<a class="btn-primary" href="https://github.com/CambridgeSportsAnalytics/rbp-math-c-abi">View C ABI on GitHub</a>
<a class="btn-ghost" href="/Install/License%20Key">License Key</a>
</div>
> [!note]
> Analysts who only need Python should start with [[Install/Python|Python]]. R users install the thin [[Install/R|rbpengine]] package **and** this runtime. This page is for the runtime itself and for advanced FFI integration.
<p> </p>
<div class="section-label"><span class="num">02</span> Install</div>
<div class="section-title">What CSA sends <em>you</em>.</div>
An installer or package for your operating system, plus short setup notes. After installation you typically have:
- The Prediction Engine shared library (<span class="mono">librbp_math_lib</span> / <span class="mono">rbp_math_lib.dll</span>)
- <span class="mono">rbp-license-info</span> — request and activate your key
- Platform companions your build needs (BLAS/LAPACK where required)
- Optional: the public header layout mirrored from the C ABI repo
Follow the README included with your download.
## Supported systems
| Operating system | Supported |
| --- | --- |
| macOS (Apple Silicon) | Yes |
| Linux | Yes (versions CSA lists for your build) |
| Windows (64-bit) | Yes |
## After you install
1. Confirm the installer finished without errors.
2. Open a new terminal (or restart the host process that will load the library).
3. Continue to [[License Key]] — you need the install before you can request a code.
```bash
rbp-license-info
rbp-license-info --setlicense RBP-LIC-1:…
```
If <span class="mono">rbp-license-info</span> is installed but your terminal does not find it, see [[License Key#Find the license tool]] (macOS, Linux, and Windows).
<p> </p>
<div class="section-label"><span class="num">03</span> Integrate</div>
<div class="section-title">Bind once. Call from <em>your</em> language.</div>
Point your loader at the installed library, include the public header (or generate bindings from it), verify the ABI version, then call predict / maxfit / grid / insights through the C API. Licensing is enforced inside the binary — the same [[License Key]] flow as every other on-premise install.
```c
#include "rbp_math.h"
if (rbp_abi_version() != RBP_ABI_VERSION) {
/* header / binary mismatch — rebuild against a matching pair */
}
/* rbp_predict(...); then rbp_prediction_results_free(...); */
```
Official language packages stay thin for a reason: the math, performance, and license gates live in one runtime. Native integration gives you that same robustness without waiting on a first-party client.
<div class="btn-row center">
<a class="btn-primary" href="/Install/License%20Key">Go to License Key</a>
<a class="btn-ghost" href="https://github.com/CambridgeSportsAnalytics/rbp-math-c-abi">C ABI contract</a>
</div>