Skip to content

Conversation

@dianchia
Copy link

@dianchia dianchia commented Feb 3, 2026

This PR integrates the previously exposed Rust Tables (#1189) into the main NuScenes class while preserving the existing Python SDK behaviour.

Key points:

  • Introduces a _PythonLoader class that encapsulates the original Python table loading and indexing logic.
  • Introduces a _RustLoader class that wraps the Rust Tables extension and exposes equivalent functionality.
  • Adds a use_rust flag to NuScenes.__init__ (default: False) to select between _PythonLoader and _RustLoader.
    • The flag is no-op by default, ensuring current Python behaviour remains unchanged.
  • All table lookups and helper methods (get, reverse indexing, shortcuts) are delegated to the selected loader via a single internal _loader attribute.
  • No new public API is added, and no behaviour changes occur for users who do not set use_rust=True.

This PR completes the optional Rust integration, providing a fully contained, Python-compatible pathway for using the Rust extension, while allowing future PRs to optimise and expand the Rust functionality without impacting existing Python workflows.

Configure Cargo.toml and pyproject.toml for PyO3 extension.
Include a CI workflow for building wheels with maturin for different OS and Python versions.
- Implement nuScenes core data structures such as Scene, Sample, SampleAnnotation, etc.
Implement domain logics:
- Convert from model struct to domain struct.
- Add fields for "shortcuts" between tables.
Glue Rust domain into Python.
Integrate Rust backend into Python SDK as an opt-in feature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant