Summary
Align the repository layout with the standard Lance / PyO3 hybrid structure so the Python package lives under a dedicated python/ directory parallel to Rust crates.
Motivation
- Mirrors the
lance-format/lance tree, making it familiar to existing contributors.
- Keeps the Rust core (
crates/) free of Python dependencies, enabling reuse in other contexts (WASM, services, etc.).
- Clarifies ownership boundaries between core logic and bindings.
Proposed Layout
/ # workspace root (Cargo.toml)
├── crates/
│ ├── lance-context-core/
│ └── lance-context/
├── python/
│ ├── Cargo.toml # PyO3 binding crate
│ ├── pyproject.toml # Maturin build config
│ ├── src/
│ │ └── lib.rs # #[pymodule] and bridge code
│ └── python/
│ └── lance_context/
│ ├── __init__.py
│ ├── client.py
│ └── schema.py
└── examples/
Details
- Move the existing binding crate and Python package into
python/, matching Lance’s monorepo pattern.
- Ensure
python/pyproject.toml drives Maturin builds, bundling the Rust glue in python/src and the pure Python code in python/python/lance_context.
- Organize the pure Python layer to hold type hints, async wrappers, and documentation strings that complement the compiled module.
Acceptance Criteria
- Repository adopts the structure above without breaking existing import paths.
- Core crates compile independently of Python.
- Python wheel builds succeed via
maturin using the new layout.
- README / contributor docs reflect the new tree.
Summary
Align the repository layout with the standard Lance / PyO3 hybrid structure so the Python package lives under a dedicated
python/directory parallel to Rust crates.Motivation
lance-format/lancetree, making it familiar to existing contributors.crates/) free of Python dependencies, enabling reuse in other contexts (WASM, services, etc.).Proposed Layout
Details
python/, matching Lance’s monorepo pattern.python/pyproject.tomldrives Maturin builds, bundling the Rust glue inpython/srcand the pure Python code inpython/python/lance_context.Acceptance Criteria
maturinusing the new layout.