TezzNative v1.1.0 is hardening toward production. View roadmap

Python Bridge

Use Python for orchestration and TezzNative for native hot paths.

Milestone 6 adds a gated CPython extension scaffold generator for ABI-safe TezzNative functions.

Command

Generate
tezzc pyext module.tn [out_dir] [--module name]

The generator emits CPython wrapper C, an ABI header, setup metadata, ownership docs, and a deterministic wrapped/skipped manifest.

Generated Files

  • <module>_pyext.c CPython wrapper source.
  • <module>.h ABI declarations for wrapped functions.
  • setup.py setuptools scaffold using native objects or libraries.
  • README.md ownership and build notes.
  • pyext_manifest.tnx wrapped/skipped function summary.

Type Mapping

TezzNativePython InputPython Return
int / i64Python intPython int
u8Python int 0..255Python int
float / f64Python floatPython float
*char / *u8 parameterContiguous buffer objectNot returned
void returnn/aNone

Ownership

  • Primitive values are copied between Python and TezzNative.
  • Buffer parameters are borrowed with PyObject_GetBuffer only for the call duration.
  • Borrowed buffers are released on success and error paths.
  • Pointer returns, structs, and unsafe functions are skipped in the starter bridge.

Gate

Windows
powershell -ExecutionPolicy Bypass -File .\tests\conformance\run-python-bridge.ps1 -Tezzc .\TezzNative-language\build\tezzc.exe
Linux / WSL
bash tests/conformance/run-python-bridge.sh ./TezzNative-language/bin/tezzc-linux-x64
Expected
PYBRIDGE_SUMMARY passed=8 failed=0