Architecture

Author:

Rohit Goswami

Layout

eindir/
  Cargo.toml          Rust crate (lib + cdylib + staticlib)
  src/                Rust source
  include/            hand-written C++ companion header
  python/eindir/      Python package (mixed maturin layout)
  pytest/             pytest suite
  docs/               this documentation

Crate types

The Rust crate produces three artefacts:

  • rlib for downstream Rust consumers

  • cdylib for Python (pyo3) and C dynamic loading

  • staticlib for C/C++ static linking

Bindings

  • *Python.

eindir._core is the Rust extension; the user-facing package eindir re-exports both Rust types and pure-Python helpers from a mixed-mode maturin layout.

  • *C.

cargo-c produces eindir-core.h and libeindir_core.{a,so} with pkg-config integration via eindir-core.pc.

  • *C++.

The hand-written include/eindir-core.hpp wraps the C ABI in namespace eindir for ergonomic C++ use.