Skip to content

Rust backend for Peptonizer2000#4

Open
SimonVandeVyver wants to merge 87 commits into
masterfrom
rust-wasm
Open

Rust backend for Peptonizer2000#4
SimonVandeVyver wants to merge 87 commits into
masterfrom
rust-wasm

Conversation

@SimonVandeVyver
Copy link
Copy Markdown

This PR adds a complete Rust backend for Peptonizer2000 and wires it into the full package ecosystem.

  • Implements the core algorithm in Rust under peptonizer_rust/, with native and WASM build targets
  • Adds a Rust/WASM integration layer so peptonizer_ts can consume the compiled WebAssembly build
  • Adds Python package support for peptonizer_rust using pyo3 and maturin
  • Adds support for building wheels for all major platforms
  • Updates the Snakemake workflow environment to find local peptonizer_rust wheel artifacts
  • Updates README installation and troubleshooting instructions for the Rust wheel build path
  • Integrates the Rust backend across the repo so the package now uses the new implementation throughout the Python workflow, frontend, and packaging pipeline

@SimonVandeVyver SimonVandeVyver requested a review from pverscha May 19, 2026 12:12
Copy link
Copy Markdown
Contributor

@pverscha pverscha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reviewed and tested the changes in this PR. Overall very nice work, thank you!

I do have some remarks that you should take a look at before we can continue and merge this PR:

  • The tests for Rust do not succeed. This is the error that is generated when running cargo test in the peptonizer_rust directory:
error[E0425]: cannot find function `parse_taxon_scores` in this scope
  --> src/zero_lookahead_belief_propagation.rs:55:20
   |
55 |         let json = parse_taxon_scores(csv_content);
   |                    ^^^^^^^^^^^^^^^^^^ not found in this scope
  • Continueing with the tests, I think it would be good if we could also implement a GitHub Action workflow that automatically runs the Rust tests on push to the repo.

I have also left some comments directly onto the code, please take a look at those as well.

Comment thread peptonizer_rust/src/http_client.rs Outdated
Comment thread peptonizer_rust/src/http_client.rs Outdated
Comment thread .github/workflows/wheels.yml
Comment thread snakemake/config/config.yaml Outdated
@SimonVandeVyver SimonVandeVyver requested a review from pverscha June 2, 2026 13:05
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.

2 participants