-
Notifications
You must be signed in to change notification settings - Fork 183
/
Copy pathCargo.toml
107 lines (87 loc) · 4.18 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
[package]
name = "ureq"
version = "3.0.0-rc5"
authors = ["Martin Algesten <martin@algesten.se>", "Jacob Hoffman-Andrews <ureq@hoffman-andrews.com>"]
description = "Simple, safe HTTP client"
license = "MIT OR Apache-2.0"
repository = "https://github.com/algesten/ureq"
readme = "README.md"
keywords = ["web", "request", "https", "http", "client"]
categories = ["web-programming::http-client"]
edition = "2018"
exclude = ["/cargo_deny.sh", "/deny.toml", "/test.sh"]
# MSRV
rust-version = "1.71.1"
[features]
default = ["rustls", "gzip", "json"]
######## SUPPORTED FEATURES
rustls = ["rustls-no-provider", "_ring"]
native-tls = ["dep:native-tls", "dep:der", "_tls", "dep:webpki-root-certs"]
platform-verifier = ["dep:rustls-platform-verifier"]
socks-proxy = ["dep:socks"]
cookies = ["dep:cookie_store", "_url"]
gzip = ["dep:flate2"]
brotli = ["dep:brotli-decompressor"]
charset = ["dep:encoding_rs"]
json = ["dep:serde", "dep:serde_json", "cookie_store?/serde_json"]
######## UNSTABLE FEATURES.
# Might be removed or changed in a minor version.
# Rustls CryptoProviders are not picked up from feature flags alone. They must be
# configured on Agent. This feature flag makes it possible to compile ureq with
# rustls, but without ring.
rustls-no-provider = ["dep:rustls", "_tls", "dep:webpki-roots", "_rustls"]
# Supported as long as native-tls supports this.
vendored = ["native-tls?/vendored"]
######## INTERNAL FEATURES. DO NOT USE.
# Ring has a higher chance of compiling cleanly without additional developer environment.
# Supported as long as rustls supports this.
_ring = ["rustls?/ring"]
_url = ["dep:url"]
_tls = ["dep:rustls-pemfile", "dep:rustls-pki-types"]
_test = []
_rustls = []
_doc = ["rustls?/aws-lc-rs"]
[package.metadata.docs.rs]
features = ["rustls", "platform-verifier", "native-tls", "socks-proxy", "cookies", "gzip", "brotli", "charset", "json", "_test", "_doc"]
[dependencies]
base64 = "0.22.1"
ureq-proto = "0.2.3"
# ureq-proto = { path = "../ureq-proto" }
log = "0.4.22"
once_cell = "1.19.0"
utf-8 = "0.7.6"
percent-encoding = "2.3.1"
# These are used regardless of TLS implementation.
rustls-pemfile = { version = "2.1.2", optional = true, default-features = false, features = ["std"] }
rustls-pki-types = { version = "1.7.0", optional = true, default-features = false, features = ["std"] }
# rustls-platform-verifier held back due to 0.4.0 causing a double
# depedendency on windows-sys (0.59.0, 0.52.0) and security-framework (2.11.1, 3.1.0)
rustls-platform-verifier = { version = "0.3.4", optional = true, default-features = false }
webpki-roots = { version = "0.26.3", optional = true, default-features = false }
webpki-root-certs = { version = "0.26.4", optional = true, default-features = false }
rustls = { version = "0.23.18", optional = true, default-features = false, features = ["logging", "std", "tls12"] }
native-tls = { version = "0.2.12", optional = true, default-features = false }
der = { version = "0.7.9", optional = true, default-features = false, features = ["pem", "std"] }
socks = { version = "0.3.4", optional = true }
# cookie_store uses Url, while http-crate has its own Uri.
# Keep url crate in lockstep with cookie_store.
cookie_store = { version = "0.21.1", optional = true, default-features = false, features = ["preserve_order"] }
# ureq-proto forces url=2.5.4. This optional dep documents the situation in cookie_store.
url = { version = "2.3.1", optional = true, default-features = false }
flate2 = { version = "1.0.30", optional = true }
brotli-decompressor = { version = "4.0.1", optional = true }
encoding_rs = { version = "0.8.34", optional = true }
serde = { version = "1.0.204", optional = true, default-features = false, features = ["std"] }
serde_json = { version = "1.0.120", optional = true, default-features = false, features = ["std"] }
[build-dependencies]
cc = "1.0.106"
[dev-dependencies]
env_logger = "0.11.6"
auto-args = "0.3.0"
serde = { version = "1.0.204", features = ["std", "derive"] }
assert_no_alloc = "1.1.2"
# Enable aws-lc-rs for tests so we can demonstrate using ureq without compiling ring.
rustls = { version = "0.23", features = ["aws-lc-rs"] }
[[example]]
name = "cureq"
required-features = ["rustls", "native-tls", "socks-proxy", "cookies", "gzip", "brotli", "charset"]