Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use bzip2 pure rust mode? #320

Open
NobodyXu opened this issue Dec 19, 2024 · 2 comments
Open

Use bzip2 pure rust mode? #320

NobodyXu opened this issue Dec 19, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@NobodyXu
Copy link
Collaborator

trifectatechfoundation/bzip2-rs#40 (comment)

bzip2 has added a new feature, to opt in to use libbz2-rs-sys, a pure-rust implementation created by calling c2rust on the original C codebase.

This results in a pure-rust implementation that is:

  • easier to cross compile
  • No external c compiler needs to be installed
  • No build-script or build-script dependencies
  • pure rust implementation of bzip2 can be LTO against rust code, without having to configure the system to use the same clang version to compile

To use it, we need to disable default features to avoid pulling in bzip2-sys and then enable the new feature

@robjtede robjtede added the enhancement New feature or request label Dec 19, 2024
@NobodyXu
Copy link
Collaborator Author

Alternatively, bzip2 can be updated to disable bzip2-sys vendor building whenever the rust backend is enabled.

I will try submit a patch and see if they are willing to take it.

@NobodyXu
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants