awesterb opened a new pull request, #724: URL: https://github.com/apache/arrow-rs-object-store/pull/724
# Which issue does this PR close? Closes #723 . # Rationale for this change We're using `object_store` with a code base that already uses `awc` as HTTP-client, and would like to avoid having `reqwest` as additional HTTP client alongside `awc`. An alternative [`HttpConnector`](https://docs.rs/object_store/latest/object_store/client/trait.HttpConnector.html) can already be provided currently, but the `reqwest` dependency can not yet be avoided. Also, since `reqwest` can't be used for `wasm32-wasip1` anyways, not having to package it there is nice too. # What changes are included in this PR? Adds a new `reqwest` feature that gates `dep:reqwest`, but is enabled by `cloud` by default. This means `reqwest` will still be pulled in by the `azure`, `gcp`, `aws` and `http` features, as is the case now. For avoiding `reqwest`, the features `cloud-base`, `azure-base`, `gcp-base`, `aws-base` and `http-base` are added. Some features that depend on `reqwest` types I gated behind `reqwest` too, such as [`client::Certificate`](https://docs.rs/object_store/latest/object_store/client/struct.Certificate.html). To keep the pull request minimal and non-breaking, I did not attempt to rewrite those to be `reqwest`-independent. I believe all of the gated features can be avoided when providing your own `HttpConnector`. (Besides, most of these features were already gated behind `!wasm32`.) Tests that use `reqwest`-gated types were gated behind `reqwest` too. Added to CI extra `clippy` jobs to catch missing gates in the future, and a build job for `wasm32-wasip1` without `reqwest`. Where `reqwest::{Method,StatusCode,header}` was used, this was replaced by the `http` types. I considered copying the `X-no-crypto` naming scheme (`aws-no-crypto`, `gcp-no-crypto` ...) from GH-707, but decided not to use `aws-no-reqwest` (etc.) since that would necessitate `aws-no-crypto-no-reqwest` (and worse) in the future. (Combining !707 could make sense, having `X-base` mean no crypto and no reqwest.) # Are there any user-facing changes? The feature `reqwest` that gates `dep:reqwest`, and the features `cloud-base`, `azure-base`, `gcp-base`, `aws-base` and `http-base` that avoid `reqwest`. No breaking changes (according to <https://crates.io/crates/cargo-semver-checks>.) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
