Skip to content

Enable RCSB feature for Linux Python wheels #8

@HFooladi

Description

@HFooladi

Summary

Currently, Linux Python wheels are built without the RCSB feature due to OpenSSL cross-compilation issues in manylinux containers. This means Linux users cannot use download_structure() and rcsb_search() functions.

Current Behavior

Platform RCSB Feature
macOS ✅ Available
Windows ✅ Available
Linux ❌ Not available

Root Cause

The reqwest crate uses native-tls by default, which requires OpenSSL. Cross-compiling OpenSSL for Linux aarch64 in manylinux containers fails because:

  1. before-script-linux in maturin-action runs on the host, not inside the container for cross-compilation
  2. native-tls-vendored requires Perl modules (IPC::Cmd, FindBin) not available in manylinux containers
  3. rustls-tls alternative fails because ring crate doesn't support aarch64 cross-compilation

Potential Solutions to Investigate

1. Use rustls-tls with aws-lc-rs backend

  • ring is being replaced by aws-lc-rs in many projects
  • May have better cross-compilation support
  • Requires reqwest feature configuration change

2. Custom manylinux Docker image

  • Pre-install OpenSSL development headers
  • Pre-install required Perl modules
  • Use as custom container in CI

3. Use zig for cross-compilation

  • cargo-zigbuild handles cross-compilation better
  • May resolve OpenSSL linking issues

4. Separate RCSB into optional runtime dependency

  • Ship Linux wheels without RCSB compiled in
  • Provide separate pdbrust-rcsb package that users can install if needed
  • Would require Python-side HTTP implementation

5. Wait for maturin/manylinux improvements

  • Track upstream issues for better OpenSSL support
  • manylinux_2_28 might have better tooling

References

Acceptance Criteria

  • Linux x86_64 wheels include RCSB feature
  • Linux aarch64 wheels include RCSB feature
  • All existing tests pass
  • CI builds remain stable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions