Native kernel contract
The native kernel is the scientific execution boundary for the 0.7 development API. Python, Julia and R supply requests to the Rust implementation; supported operations and model keys are defined by that implementation. A language binding does not silently substitute an earlier numerical backend when a feature is unavailable.
Select an interface
Section titled “Select an interface”| Interface | Appropriate use | Reference |
|---|---|---|
Python fit and predict |
Ordered Polars tables and fitted model state | Fit and predict |
Python execute |
Operation-specific JSON-compatible payloads | Execute |
Julia kernel_call |
Explicit requests through the native C ABI | Julia reference |
R kernel_call or kernel_call_json |
R objects or a JSON response through the C ABI | R reference |
| Rust workspace crates | Native scientific, tabular and FFI integration | Rust core |
Use a documented high-level wrapper when it expresses your task. Low-level
requests expose operation-specific fields and therefore require closer attention
to that operation’s schema. Model discovery is available through
execute("discover_models"); the executable API example
checks that discovery returns the expected native model inventory.
Request and response fields
Section titled “Request and response fields”The Python execute wrapper builds a request with schema_version equal to
"2.0", an operation, a model_key and a payload. Its optional model
argument becomes model_key; it is null for operations that do not select a
model. Payload fields depend on the chosen operation. JSON serialization rejects
non-finite values rather than converting them into an undocumented sentinel.
A successful call returns the decoded response envelope, including its result
and operation metadata. Success does not require an explicit error member:
some successful envelopes omit it. A non-null native error is raised by the
Python wrapper as NativeError, with a
machine-readable code and optional validation details. Serialization, Polars
and invalid table errors can arise before a native envelope exists; use the
specific wrapper’s documented exception contract.
Scenario and batch operations can contain per-item outcomes. Inspect the documented result structure instead of treating outer-request success as proof that every scenario succeeded. The scenario tutorial checks every execution and comparison before exporting or replaying results.
Preserve state and configuration
Section titled “Preserve state and configuration”FitResult retains the successful fitting
envelope, including constructor options needed for subsequent predictions.
Its predict method uses that fitted configuration with a new explicit time
table. Preserve the envelope and relevant runtime versions when recording an
analysis; a parameter vector without its model options can describe a different
scientific calculation.
The Python result object prevents attribute reassignment, but the nested envelope is mutable and accessors return shallow copies. Treat it as an analysis record; do not mutate nested state to create an undocumented alternative model. Use explicit scenario specifications when comparing alternatives.
Validation and trust boundaries
Section titled “Validation and trust boundaries”Input validation establishes conformity with implemented rules. It does not establish causal identification, measurement quality, a data licence, model adequacy or empirical interval coverage. Read core concepts for the distinction between a valid request and a suitable analysis.
Registered extension callbacks run trusted code in their host process. Manifest resolution and result validation do not sandbox a callback or establish its scientific validity. See the extension API before integrating application code.
The binding source is the implementation reference for request serialization and error decoding. Generated API manifests identify their exact source hashes. Cross-version replay and release readiness remain explicit qualification work in the native guide.