Skip to content

Commit a1c4952

Browse files
committed
Rework project manifest to discern features and optional dependencies.
1 parent 74ae58e commit a1c4952

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Cargo.toml

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "zeptohttpc"
33
description = "minimal HTTP client using http and httparse crates"
4-
version = "0.9.0"
4+
version = "0.9.1"
55
authors = ["Adam Reichold <[email protected]>"]
66
edition = "2018"
77
rust-version = "1.60"
@@ -13,10 +13,14 @@ keywords = ["http", "https", "client", "request", "response"]
1313
categories = ["network-programming", "web-programming", "web-programming::http-client"]
1414

1515
[features]
16-
json = ["serde", "serde_json"]
16+
encoding_rs = ["dep:encoding_rs"]
17+
flate2 = ["dep:flate2"]
18+
json = ["dep:serde", "dep:serde_json"]
1719
tls = ["tls-webpki-roots"]
18-
tls-webpki-roots = ["rustls", "webpki-roots", "once_cell"]
19-
tls-native-roots = ["rustls", "rustls-native-certs", "once_cell"]
20+
tls-webpki-roots = ["dep:rustls", "dep:webpki-roots", "dep:once_cell"]
21+
tls-native-roots = ["dep:rustls", "dep:rustls-native-certs", "dep:once_cell"]
22+
rustls = ["dep:rustls"]
23+
native-tls = ["dep:native-tls"]
2024

2125
[dependencies]
2226
encoding_rs = { version = "0.8", optional = true }
@@ -26,10 +30,10 @@ httparse = "1.3"
2630
native-tls = { version = "0.2", optional = true }
2731
once_cell = { version = "1.0", optional = true }
2832
rustls = { version = "0.22", optional = true }
33+
rustls-native-certs = { version = "0.7", optional = true }
2934
serde = { version = "1.0", optional = true }
3035
serde_json = { version = "1.0", optional = true }
3136
webpki-roots = { version = "0.26", optional = true }
32-
rustls-native-certs = { version = "0.7", optional = true }
3337

3438
[package.metadata.docs.rs]
3539
all-features = true

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ This crate aims to be the smallest possible yet practically useful HTTP client b
1010

1111
* `encoding_rs`: Support for bodies in various character sets using the [`encoding_rs`](https://docs.rs/encoding_rs) crate.
1212
* `flate2`: Support for compressed bodies using the [`flate2`](https://docs.rs/flate2) crate.
13-
* `native-tls`: Support HTTPS connections using the [`native-tls`](https://docs.rs/native-tls) crate.
1413
* `json`: Support for JSON bodies using the [`serde`](https://docs.rs/serde) and [`serde_json`](https://docs.rs/serde_json) crates.
1514
* `tls-webpki-roots`: Support for HTTPS connections using the [`rustls`](https://docs.rs/rustls) crate with roots provided by the [`webpki-roots`](https://docs.rs/webpki-roots) crate.
1615
* `tls-native-roots`: Support for HTTPS connections using the [`rustls`](https://docs.rs/rustls) crate with roots provided by the [`rustls-native-certs`](https://docs.rs/rustls-native-certs) crate.
1716
* `rustls`: Support for HTTPS connections using the [`rustls`](https://docs.rs/rustls) crate without a default set of roots.
17+
* `native-tls`: Support HTTPS connections using the [`native-tls`](https://docs.rs/native-tls) crate.
1818

1919
## License
2020

0 commit comments

Comments
 (0)