You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(deps): use minreq for native-tls, ureq for rustls to control binary size (#59)
On `main`, both `native-tls` and `rustls` use `ureq` via
`ureq/native-tls` and `ureq/rustls`. This PR switches the sync HTTP
client so each feature uses the dependency that produces the smallest
binary:
- **`native-tls`** → `minreq 3.0.0-rc.0` + `https-native-tls`. minreq
with system TLS is the smallest option (~540 KB). The feature name
change from `native-tls` to `https-native-tls` fixes a compilation
failure against minreq 3.x (renamed from 2.x).
- **`rustls`** → `ureq 3.3.0` + `ureq/rustls`. ureq's rustls backend
uses `ring`; minreq's `https-rustls` uses `aws-lc-rs`, which adds ~1.7
MB to the binary.
Both dependencies are now optional and only pulled in by their
respective feature. A `compile_error!` is emitted if neither TLS feature
is enabled.
- Using `native-tls` (system TLS) instead of bundling rustls
21
-
- Minimal JSON parsing (string search instead of serde)
20
+
- Using `native-tls` (system TLS via `minreq`) instead of bundling rustls by default
21
+
- Using `ureq` for the `rustls` feature, which uses `ring` rather than `aws-lc-rs` (minreq's
22
+
rustls backend would add ~1.7 MB due to aws-lc-rs)
22
23
- Simple file-based caching
23
24
24
25
## Installation
@@ -138,9 +139,9 @@ async fn main() {
138
139
139
140
| Feature | Default | Description |
140
141
|---------|---------|-------------|
141
-
|`native-tls`| ✅ |Uses system TLS libraries, smaller binary |
142
+
|`native-tls`| ✅ |System TLS via `minreq`. Smallest binary (~540 KB).|
142
143
|`do-not-track`| ✅ | Respects the `DO_NOT_TRACK` environment variable |
143
-
|`rustls`|| PureRust TLS, no system dependencies |
144
+
|`rustls`|| Pure-Rust TLS via `ureq` + ring. No system dependencies; good for cross-compilation. Uses `ureq` rather than `minreq` to avoid `aws-lc-rs` (~1.7 MB overhead).|
144
145
|`async`|| Async support using `reqwest`|
145
146
|`response-body`|| Includes the raw crates.io response body in `UpdateInfo`|
0 commit comments