Native Extensions
Edit this pageCurrent native-extension compatibility surface and scientific-stack bring-up status.
Native extension support is an active workstream focused on C-API closure and scientific-stack bring-up. PYRS targets a disciplined, CPython-semantics-first extension substrate rather than ad-hoc compatibility shims.
Compatibility Modes
| Mode | Status |
|---|---|
pyrs314 (source-build mode) | Primary supported mode for extension bring-up. |
cp314 wheel-compat reuse | Deferred until ABI/runtime conformance evidence is sufficient. |
Current Implemented Surface
| Surface | Current state |
|---|---|
Manifest-backed extension loading (.pyrs-ext) | Implemented and smoke-covered. |
Direct shared-object import (.so/.dylib/.pyd) | Implemented with pyrs_extension_init_v1 and PyInit_* fallback. |
| CPython single-phase init compatibility slice | Partial baseline implemented; full C-API breadth remains open. |
| PEP 489 multi-phase init | Not closed yet. |
Scientific-Stack Snapshot (2026-02-23)
| Gate | Status |
|---|---|
import numpy as np | PASS |
int(np.array([1,2,3]).sum()) == 6 | PASS |
numpy._core.numerictypes core checks | PASS |
import scipy | PASS (latest direct probe snapshot) |
import pandas, matplotlib probes | Still failing in direct mode; active root-cause closure work remains. |
Probe Commands
Shell
$ python3 scripts/probe_numpy_gate.py --pyrs target/debug/pyrs --cpython-lib .local/Python-3.14.3/Lib --out perf/numpy_gate_latest.json --timeout 20 $ python3 scripts/probe_numpy_gate.py --pyrs target/debug/pyrs --cpython-lib .local/Python-3.14.3/Lib --include-scientific-stack --probe-local-stack --python-probe-bin .venv-ext314/bin/python --out perf/numpy_gate_direct_latest.json --timeout 30 Canonical Internal Trackers
docs/EXTENSION_CAPABILITY_MATRIX.mddocs/EXTENSION_PACKAGING_CONTRACT.mddocs/EXTENSION_CAPI_V1.mddocs/CAPI_PLAN.mddocs/CAPI_LIFETIME_MODEL.mddocs/NUMPY_BRINGUP_GATE.md