Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ C-RELNOTES
C-RW-VALUE
C-SERDE
C-SMART-PTR
CAS
CLI
CONTRIBUTING.md
CPUs
Expand Down Expand Up @@ -126,7 +125,6 @@ RMWs
RPC
Rc
Redis
Reqwest
Resize
Comment thread
martintmk marked this conversation as resolved.
Reusability
Rustdoc
Expand Down Expand Up @@ -561,3 +559,10 @@ rustls
TLS
verifier
Verifier
customizable
durations
unencrypted
globals
seatbelt
CAS
runnable
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Please see each crate's change log below:
- [`data_privacy`](./crates/data_privacy/CHANGELOG.md)
- [`data_privacy_macros`](./crates/data_privacy_macros/CHANGELOG.md)
- [`data_privacy_macros_impl`](./crates/data_privacy_macros_impl/CHANGELOG.md)
- [`fetch`](./crates/fetch/CHANGELOG.md)
- [`fetch_hyper`](./crates/fetch_hyper/CHANGELOG.md)
- [`fetch_options`](./crates/fetch_options/CHANGELOG.md)
- [`fetch_tls`](./crates/fetch_tls/CHANGELOG.md)
Expand Down
221 changes: 221 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ data_privacy = { path = "crates/data_privacy", default-features = false, version
data_privacy_core = { path = "crates/data_privacy_core", default-features = false, version = "0.1.0" }
data_privacy_macros = { path = "crates/data_privacy_macros", default-features = false, version = "0.10.0" }
data_privacy_macros_impl = { path = "crates/data_privacy_macros_impl", default-features = false, version = "0.10.0" }
fetch = { path = "crates/fetch", default-features = false, version = "0.10.0" }
fetch_hyper = { path = "crates/fetch_hyper", default-features = false, version = "0.3.0" }
fetch_options = { path = "crates/fetch_options", default-features = false, version = "0.2.0" }
fetch_tls = { path = "crates/fetch_tls", default-features = false, version = "0.2.1" }
Expand Down Expand Up @@ -63,6 +64,7 @@ ahash = { version = "0.8.4", default-features = false }
alloc_tracker = { version = "0.5.9", default-features = false }
allocator-api2 = { version = "0.4.0", default-features = false }
anyhow = { version = "1.0.100", default-features = false }
argh = { version = "0.1.13", default-features = false }
async-once-cell = { version = "0.5.0", default-features = false }
base64 = { version = "0.22.0", default-features = false, features = ["alloc"] }
bolero = { version = "0.13.4", default-features = false }
Expand Down Expand Up @@ -127,6 +129,7 @@ rstest = { version = "0.26.0", default-features = false }
rustc-hash = { version = "2.1.0", default-features = false }
rustls = { version = "0.23.40", default-features = false }
rustls-pki-types = { version = "1.14.1", default-features = false }
rustls-platform-verifier = { version = "0.7.0", default-features = false }
serde = { version = "1.0.228", default-features = false }
serde_core = { version = "1.0.228", default-features = false }
serde_json = { version = "1.0.145", default-features = false }
Expand All @@ -142,6 +145,7 @@ tower = { version = "0.5.2", default-features = false }
tower-layer = { version = "0.3.3", default-features = false }
tower-service = { version = "0.3.3", default-features = false }
tracing = { version = "0.1.41", default-features = false }
tracing-appender = { version = "0.2.5", default-features = false }
tracing-subscriber = { version = "0.3.20", default-features = false }
tracing-test = { version = "0.2.6", default-features = false }
trait-variant = { version = "0.1.2", default-features = false }
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ These are the primary crates built out of this repo:
- [`cachet_service`](./crates/cachet_service/README.md) - Layered service integration for the cachet caching library.
- [`cachet_tier`](./crates/cachet_tier/README.md) - Core cache tier trait and abstractions for building cache backends.
- [`data_privacy`](./crates/data_privacy/README.md) - Mechanisms to classify, manipulate, and redact sensitive data.
- [`fetch`](./crates/fetch/README.md) - "Universal, composable and resilient HTTP client."
- [`fetch_hyper`](./crates/fetch_hyper/README.md) - Hyper-based HTTP transport utilities for fetch.
- [`fetch_options`](./crates/fetch_options/README.md) - Options types for 'fetch' crate.
- [`fundle`](./crates/fundle/README.md) - Compile-time safe dependency injection for Rust.
Expand Down
28 changes: 28 additions & 0 deletions crates/fetch/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# fetch crate

## Conditional Compilation

**A TLS backend is mandatory to create an `HttpClient` for real network use.**
The `tokio` runtime alone is not enough — the hyper transport layer is built on top of
TLS, so both must be enabled together. There are currently two TLS backends, `rustls`
and `native-tls`, and more may be added. This produces the recurring cfg-guard pattern:

```rust
// "compile when the tokio runtime is selected AND a TLS backend is enabled"
#[cfg(all(feature = "tokio", any(feature = "rustls", feature = "native-tls")))]
```

When adding a new TLS backend, extend the inner `any(...)` accordingly (e.g. add the new
feature alongside `rustls` and `native-tls`).

Some items are guarded by a single TLS backend plus `test`, for example the TLS error
label resolution:

```rust
#[cfg(any(feature = "rustls", test))]
// ...
#[cfg(any(feature = "native-tls", test))]
```

`test-util` is the only escape hatch: it enables `FakeHandler` (canned responses, no
network), so no TLS backend is needed.
Loading
Loading