Skip to content

meta: adopt standard rust/python project layout #18

@beinan

Description

@beinan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions