8. Language Bindings Overview
Supported bindings
C ABI
Python
Fortran (ISO C binding-based)
Choosing a binding
C ABI for stable interoperability with C and foreign-language bridges
Python for interactive/data-science and orchestration workflows
Fortran for HPC codes integrating with C ABI handles
C ABI usage model
explicit handle lifecycle (
create/destroy)explicit
dtl_statuserror handlingbackend capability checks and availability codes
See: docs/bindings/c_bindings.md
Python usage model
native extension + high-level Pythonic wrappers
NumPy integration for local data views/copies
async and callback APIs require careful lifecycle awareness
See: docs/bindings/python_bindings.md
Fortran usage model
iso_c_bindinginterop wrappers around C ABIhandle-oriented lifecycle with explicit destroy calls
status-code-driven failure handling
See: docs/bindings/fortran_bindings.md
Cross-language parity guidance
When switching layers (C++ to C/Python/Fortran):
verify equivalent status/error semantics
verify ownership rules are preserved
verify backend-unavailable behavior is consistent
For a detailed function-by-function comparison, see:
API Parity Matrix — full coverage table for every C API function across all bindings
Intentional Differences — rationale for deliberate cross-language divergences
distributed_span mapping across bindings
All language bindings now expose first-class distributed span surfaces:
C ABI:
dtl_span_t(dtl_span_from_vector/array/tensor, subspan and local access APIs)Python:
dtl.DistributedSpan(...)factory wrapping typed native span handlesFortran:
dtl_span_*interfaces indtl.f90(including creation, subspan, and local data access)
Across all bindings, distributed spans remain non-owning. The underlying owner (container/context/runtime handle) must outlive all spans and borrowed local views.
Binding test expectations
C ABI tests pass
Fortran smoke tests pass
Python non-MPI/non-CUDA suite passes (plus MPI/CUDA marked suites when available)
Next step
Continue to Chapter 9.