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

Libify #356

Merged
merged 3 commits into from
May 3, 2022
Merged

Libify #356

merged 3 commits into from
May 3, 2022

Conversation

Jake-Shadle
Copy link
Contributor

This PR makes changes so that this crate it can be used as a library (eg rust-minidump/minidump-writer#21 (comment)).

  • Replaced failure with anyhow. failure has been unmaintained for several years, anyhow is one of the maintained alternatives. This change is intended as temporary, as IMO the errors in this crate should use thiserror, or just manually defined errors, as it makes library usage easier by not using string errors for everything, but made sense for a binary application.
  • Places clap and simplelog behind a cli feature flag, these dependencies are only used when used as a binary, crates that depend on this as a library don't need them and thus should not compile them. To preserve backwards compatibility for cargo install this feature is made default, so library users will need to explicitly opt-out.
  • Places HTTP symbol retrieval behind the http feature. This removes several heavy dependencies only used for retrieving symbols from remote symbol stores, in the use case that motivated this PR linked above, this functionality is not needed and only adds compile time for no benefit. Again, this feature is enabled by default for backwards compatibility.
  • Replaces reqwest's use of native-tls with rustls, simplifying the build when http is enabled. I frankly despise OpenSSL and all of the aggravating problems that come with it, rustls is a drop-in replacement that completely avoids all of those aggravations. This change is obviously due to my personal bias, I can back it out if requested.

Resolves: #253

Copy link
Collaborator

@gabrielesvelto gabrielesvelto left a comment

Choose a reason for hiding this comment

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

LGTM

@gabrielesvelto gabrielesvelto merged commit 31b9536 into mozilla:master May 3, 2022
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.

Make it rust library crate
2 participants