Skip to content

Commit

Permalink
Rework project manifest to discern features and optional dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamreichold committed Feb 18, 2024
1 parent 74ae58e commit a1c4952
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "zeptohttpc"
description = "minimal HTTP client using http and httparse crates"
version = "0.9.0"
version = "0.9.1"
authors = ["Adam Reichold <adam.reichold@t-online.de>"]
edition = "2018"
rust-version = "1.60"
Expand All @@ -13,10 +13,14 @@ keywords = ["http", "https", "client", "request", "response"]
categories = ["network-programming", "web-programming", "web-programming::http-client"]

[features]
json = ["serde", "serde_json"]
encoding_rs = ["dep:encoding_rs"]
flate2 = ["dep:flate2"]
json = ["dep:serde", "dep:serde_json"]
tls = ["tls-webpki-roots"]
tls-webpki-roots = ["rustls", "webpki-roots", "once_cell"]
tls-native-roots = ["rustls", "rustls-native-certs", "once_cell"]
tls-webpki-roots = ["dep:rustls", "dep:webpki-roots", "dep:once_cell"]
tls-native-roots = ["dep:rustls", "dep:rustls-native-certs", "dep:once_cell"]
rustls = ["dep:rustls"]
native-tls = ["dep:native-tls"]

[dependencies]
encoding_rs = { version = "0.8", optional = true }
Expand All @@ -26,10 +30,10 @@ httparse = "1.3"
native-tls = { version = "0.2", optional = true }
once_cell = { version = "1.0", optional = true }
rustls = { version = "0.22", optional = true }
rustls-native-certs = { version = "0.7", optional = true }
serde = { version = "1.0", optional = true }
serde_json = { version = "1.0", optional = true }
webpki-roots = { version = "0.26", optional = true }
rustls-native-certs = { version = "0.7", optional = true }

[package.metadata.docs.rs]
all-features = true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ This crate aims to be the smallest possible yet practically useful HTTP client b

* `encoding_rs`: Support for bodies in various character sets using the [`encoding_rs`](https://docs.rs/encoding_rs) crate.
* `flate2`: Support for compressed bodies using the [`flate2`](https://docs.rs/flate2) crate.
* `native-tls`: Support HTTPS connections using the [`native-tls`](https://docs.rs/native-tls) crate.
* `json`: Support for JSON bodies using the [`serde`](https://docs.rs/serde) and [`serde_json`](https://docs.rs/serde_json) crates.
* `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.
* `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.
* `rustls`: Support for HTTPS connections using the [`rustls`](https://docs.rs/rustls) crate without a default set of roots.
* `native-tls`: Support HTTPS connections using the [`native-tls`](https://docs.rs/native-tls) crate.

## License

Expand Down

0 comments on commit a1c4952

Please sign in to comment.