Skip to content

Draft: add in-repo Rust backend connector package#1251

Draft
gustavorubim wants to merge 3 commits into
astroautomata:masterfrom
gustavorubim:rust-backend-inrepo-connector
Draft

Draft: add in-repo Rust backend connector package#1251
gustavorubim wants to merge 3 commits into
astroautomata:masterfrom
gustavorubim:rust-backend-inrepo-connector

Conversation

@gustavorubim

Copy link
Copy Markdown

Summary

This is a draft comparison PR for the architecture Miles asked to evaluate: the Python/Rust connector package lives in the PySR repository instead of in astroautomata/symbolic_regression.rs.

It is intentionally based on the existing Rust backend adapter PR (#1242), then adds an in-repo pysr_rust_backend/ subproject that builds the pysr-rust-backend distribution and exposes the symbolic_regression_rs import module consumed by PySR's adapter.

What this demonstrates

  • Keeps the main PySR adapter plumbing from Add experimental Rust backend adapter #1242.
  • Vendors the Python/Rust connector interface into this repository as pysr_rust_backend/.
  • Leaves the Rust engine crates in astroautomata/symbolic_regression.rs; the connector uses Git dependencies for symbolic_regression and dynamic_expressions.
  • Adds connector CI that installs the subpackage, runs wrapper tests, builds wheel/sdist artifacts, and smoke-tests those artifacts.

Why draft

This is for design evaluation, not an immediate merge candidate. It lets maintainers compare two structures:

Validation

  • cargo check --manifest-path pysr_rust_backend/Cargo.toml
  • cargo fmt --check --manifest-path pysr_rust_backend/Cargo.toml
  • python -m pytest pysr_rust_backend/tests -q: 12 passed
  • python -m pysr test rust: 14 passed with the in-repo connector installed
  • Parsed .github/workflows/CI_rust_backend_connector.yml with PyYAML

Related PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant