Skip to content

Add pure rust LZMA implementation #15

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

Merged
merged 0 commits into from
Jul 30, 2022
Merged

Add pure rust LZMA implementation #15

merged 0 commits into from
Jul 30, 2022

Conversation

holly-hacker
Copy link
Contributor

This PR adds a a pure rust LZMA backend to lift the requirement on the cc crate and its build requirements. It does so by adding the mandatory, mutually-exclusive features lzma-sys and lzma-rs. If a user of the library wishes to use the replay-data feature, they must choose either feature or the crate will not compile and give a clear error message indicating the what they must do.

This is a breaking change for users of the replay-data feature as they must enable a new feature to indicate which LZMA-backend they with to use.

@holly-hacker
Copy link
Contributor Author

I pushed a change to the CI configuration so tests should run now, but I don't know if GitHub will run pipelines after I make changes to them.

@mzhang28
Copy link
Owner

Ok, that's fine. Thanks for the patch! I'll clean up some of the things regarding docs.rs features but this should be good to go.

@mzhang28 mzhang28 merged commit 75b0473 into mzhang28:master Jul 30, 2022
@holly-hacker holly-hacker deleted the feature/pure-rust-lzma branch July 30, 2022 20:01
@holly-hacker
Copy link
Contributor Author

I wasn't able to find a way to enable one implementation by default (presumably I need rust-lang/cargo#1839), but it may be more ergonomic if you know a way to do it.

@mzhang28
Copy link
Owner

Yeeeep, I was just going down that rabbit hole haha. My inclination is just to use the pure-Rust implementation directly, but I'm not sure what the usage metrics on this are.

I think I'll just have replay-data and replay-data-native-lzma, where replay-data is enabled by default. I'll probably push an update to crates.io with these changes within the hour.

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