<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.
<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, GoLang, 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 center">
<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">One URL. The right binary for <em>your</em> machine.</div>
R users should prefer <span class="mono">rbpengine::install_engine()</span> ([[Install/R|R]]). Everyone else can pull the same runtime from the docs host. The path is stable across releases:
```text
https://docs.csanalytics.io/releases/latest/manifest.json
https://docs.csanalytics.io/releases/latest/macos-arm64.tar.gz
https://docs.csanalytics.io/releases/latest/linux-x64.tar.gz
https://docs.csanalytics.io/releases/latest/linux-arm64.tar.gz
https://docs.csanalytics.io/releases/latest/windows-x64.tar.gz
```
Pin a version by replacing <span class="mono">latest</span> with a number (for example <span class="mono">/releases/1.3.0/</span>). Each archive unpacks to:
- 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)
- The public header (<span class="mono">include/rbp_math.h</span>)
## Where the runtime lives
The license tool is always <span class="mono"><prefix>/bin/rbp-license-info</span> (<span class="mono">.exe</span> on Windows). Point <span class="mono">RBP_ENGINE_HOME</span> at the prefix if you unpacked the tarball yourself.
| How you installed | Typical prefix |
| --- | --- |
| <span class="mono">rbpengine::install_engine()</span> (R default) | macOS / Linux: <span class="mono">~/.local/share/rbp-engine</span> · Windows: <span class="mono">%LOCALAPPDATA%\rbp-engine</span> |
| Unpacked tarball | The folder you extracted; set <span class="mono">RBP_ENGINE_HOME</span> to it |
| macOS <span class="mono">.pkg</span> | <span class="mono">/Library/rbp-engine</span> · often also <span class="mono">/usr/local/bin/rbp-license-info</span> |
```bash
# user prefix (including R install_engine())
~/.local/share/rbp-engine/bin/rbp-license-info
"$RBP_ENGINE_HOME/bin/rbp-license-info"
/Library/rbp-engine/bin/rbp-license-info
```
```powershell
& "$env:LOCALAPPDATA\rbp-engine\bin\rbp-license-info.exe"
& "$env:RBP_ENGINE_HOME\bin\rbp-license-info.exe"
```
## 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 unpack or 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 the command is not on <span class="mono">PATH</span>, run it from <span class="mono"><prefix>/bin/</span> in [Where the runtime lives](#where-the-runtime-lives). Python <span class="mono">pip</span> installs are a different layout. See [[License Key#Find the license tool]].
<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, using 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.
> [!note]- Functions, Settings, and Results chapters
> The [[Functions/Overview|Functions]], [[Settings/Overview|Settings]], 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.
<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>