Skip to content

Commit

Permalink
Merge pull request #96 from lucab/ups/reqwest-rustls
Browse files Browse the repository at this point in the history
cargo: expose reqwest TLS feature flags
  • Loading branch information
steveej authored Feb 8, 2019
2 parents a10c1ab + 0110c13 commit 1f4359d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,16 @@ strum_macros = "0.13"
tar = "0.4"
tokio = "0.1"
dirs = "1.0"
reqwest = "0.9"
reqwest = { version = "^0.9.6", default-features = false }

[dev-dependencies]
env_logger = "0.6"
spectral = "0.6"

[features]
default = ["reqwest-default-tls"]
reqwest-default-tls = ["reqwest/default-tls"]
reqwest-rustls = ["reqwest/rustls-tls"]
test-net = []
test-mock = ["mockito"]

Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ conformant to the [Docker Registry HTTP API V2][registry-v2] specification.

[registry-v2]: https://docs.docker.com/registry/spec/api/

## Configurable features

The following is a list of [Cargo features][cargo-features] that consumers can enable or disable:

* **reqwest-default-tls** *(enabled by default)*: provides TLS support via [system-specific library][native-tls] (OpenSSL on Linux)
* **reqwest-rustls**: provides TLS support via the [rustls][rustls] library

[rustls]: https://docs.rs/rustls
[native-tls]: https://docs.rs/native-tls
[cargo-features]: https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-features-section

## Testing

### Integration tests
Expand All @@ -29,7 +40,7 @@ cargo test --features test-mock

This library includes additional interoperability tests against some of the most common registries.

Those tests are not run by default as they required network access and registry credentials.
Those tests are not run by default as they require network access and registry credentials.

They are gated behind a dedicated "test-net" feature and can be run as:
```
Expand Down

0 comments on commit 1f4359d

Please sign in to comment.