Skip to content

Introduce Rust code into Biotite#814

Merged
padix-key merged 238 commits intobiotite-dev:rustfrom
padix-key:rust
Jan 27, 2026
Merged

Introduce Rust code into Biotite#814
padix-key merged 238 commits intobiotite-dev:rustfrom
padix-key:rust

Conversation

@padix-key
Copy link
Member

@padix-key padix-key commented Jul 18, 2025

Resolves #688.

This PR introduces Rust code into Biotite. To make it work along the existing Cython modules the build backend is switched back to setuptools, using setuptools-rust to build the Rust modules.

The Rust code ends up in a single compiled file, accessible via biotite.rust. However this module contains multiple submodules mimicing the structure of biotite itself. For example there is biotite.rust.structure.io.pdb.

As initial module this PR integrates fastpdb into Biotite, including some refactoring.

Important: This PR also drops support for macos x86_64 wheels to keep the CI builds simple. I think this is reasonable as the community also begins deprecating support for macos x86_64, for example GitHub.

padix-key and others added 16 commits December 8, 2025 13:27
Add `pocketeer` to list of extensions
Add functionality for reading and writing alignments from/to A3M format
Make `filter_intersection()` more efficient
…mpat

Use positional argument in np.reshape to keep working with newer numpy
* fix: speedup rcsb fetch of bcif files which was previously slow when accessing response.text

* Raise `RequestError` on fallback

* Format

* fix: still need to check for error codes if content-type is text or html; bcif uses application/octet-stream

---------

Co-authored-by: danielkovtun <danny@vant.ai>
Co-authored-by: Patrick Kunzmann <padix.key@gmail.com>
@padix-key padix-key force-pushed the rust branch 2 times, most recently from af135df to 79d088a Compare January 27, 2026 15:01
@padix-key padix-key marked this pull request as ready for review January 27, 2026 17:30
@padix-key padix-key merged commit dcb748d into biotite-dev:rust Jan 27, 2026
9 of 25 checks passed
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 27, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing padix-key:rust (dcb748d) with main (f29c22d)1

Summary

✅ 63 untouched benchmarks
🆕 7 new benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 benchmark_get_coord N/A 589.4 µs N/A
🆕 benchmark_get_remark N/A 171.1 µs N/A
🆕 benchmark_read N/A 2.2 ms N/A
🆕 benchmark_get_structure_with_bonds N/A 55.4 ms N/A
🆕 benchmark_get_structure N/A 4 ms N/A
🆕 benchmark_set_structure_with_bonds N/A 12.6 ms N/A
🆕 benchmark_set_structure N/A 11.2 ms N/A

Footnotes

  1. No successful run was found on rust (dcb748d) during the generation of this report, so main (f29c22d) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@padix-key padix-key deleted the rust branch January 28, 2026 10:37
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.

9 participants