# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.91"
name = "fetch"
version = "0.10.2"
authors = ["The Oxidizer Project Authors"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "HTTP client with resilience, observability, and Tokio runtime support."
homepage = "https://github.com/microsoft/oxidizer"
readme = "README.md"
keywords = [
    "http",
    "client",
    "async",
    "resilience",
    "observability",
]
categories = ["network-programming"]
license = "MIT"
repository = "https://github.com/microsoft/oxidizer/tree/main/crates/fetch"
resolver = "2"

[package.metadata.cargo_check_external_types]
allowed_external_types = [
    "bytesbuf::mem::global::GlobalPool",
    "bytesbuf::mem::has_memory::HasMemory",
    "bytesbuf::mem::memory::Memory",
    "data_privacy::redaction_engine::RedactionEngine",
    "fetch_options::*",
    "fetch_tls::*",
    "http::*",
    "http_extensions::*",
    "seatbelt_http::*",
    "templated_uri::*",
    "layered::intercept::InterceptLayer",
    "layered::service::Service",
    "opentelemetry::common::KeyValue",
    "opentelemetry::metrics::meter::Meter",
    "opentelemetry::metrics::meter::MeterProvider",
    "recoverable::Recovery",
    "recoverable::RecoveryInfo",
    "thread_aware::core::ThreadAware",
    "tick::clock::Clock",
    "tower_layer::Layer",
]

[features]
default = []
json = [
    "dep:serde",
    "http_extensions/json",
]
native-tls = [
    "dep:native-tls",
    "fetch_hyper?/native-tls",
    "fetch_tls/native-tls",
]
rustls = [
    "dep:rustls",
    "dep:rustls-platform-verifier",
    "fetch_hyper?/rustls",
    "fetch_tls/rustls",
]
test-util = [
    "tick/test-util",
    "http_extensions/test-util",
]
tls = ["rustls"]
tokio = [
    "dep:tokio",
    "dep:anyspawn",
    "anyspawn/tokio",
    "dep:fetch_hyper",
    "dep:hyper-util",
    "hyper-util/tokio",
    "hyper-util/http1",
    "hyper-util/http2",
    "tick/tokio",
    "rustls?/aws-lc-rs",
]

[lib]
name = "fetch"
path = "src/lib.rs"

[[example]]
name = "http_client_advanced"
path = "examples/http_client_advanced.rs"
required-features = [
    "tokio",
    "rustls",
]

[[example]]
name = "http_client_api_with_templated_uri"
path = "examples/http_client_api_with_templated_uri.rs"
required-features = [
    "test-util",
    "json",
]

[[example]]
name = "http_client_app"
path = "examples/http_client_app.rs"
required-features = [
    "tokio",
    "rustls",
]

[[example]]
name = "http_client_breaker"
path = "examples/http_client_breaker.rs"
required-features = ["test-util"]

[[example]]
name = "http_client_connection_scaling"
path = "examples/http_client_connection_scaling.rs"
required-features = [
    "tokio",
    "rustls",
]

[[example]]
name = "http_client_custom"
path = "examples/http_client_custom.rs"

[[example]]
name = "http_client_custom_pipeline"
path = "examples/http_client_custom_pipeline.rs"
required-features = ["test-util"]

[[example]]
name = "http_client_customization"
path = "examples/http_client_customization.rs"
required-features = ["test-util"]

[[example]]
name = "http_client_fake"
path = "examples/http_client_fake.rs"
required-features = ["test-util"]

[[example]]
name = "http_client_json"
path = "examples/http_client_json.rs"
required-features = [
    "test-util",
    "json",
]

[[example]]
name = "http_client_minimal_pipeline"
path = "examples/http_client_minimal_pipeline.rs"
required-features = [
    "tokio",
    "rustls",
]

[[example]]
name = "http_client_mtls"
path = "examples/http_client_mtls.rs"
required-features = [
    "tokio",
    "rustls",
]

[[example]]
name = "http_client_native_tls"
path = "examples/http_client_native_tls.rs"
required-features = [
    "native-tls",
    "tokio",
]

[[example]]
name = "http_client_native_tls_mtls"
path = "examples/http_client_native_tls_mtls.rs"
required-features = [
    "native-tls",
    "tokio",
]

[[example]]
name = "http_client_pooling"
path = "examples/http_client_pooling.rs"
required-features = ["test-util"]

[[example]]
name = "http_client_resilience"
path = "examples/http_client_resilience.rs"
required-features = ["test-util"]

[[example]]
name = "http_client_streaming"
path = "examples/http_client_streaming.rs"
required-features = [
    "tokio",
    "rustls",
]

[[example]]
name = "http_client_telemetry"
path = "examples/http_client_telemetry.rs"
required-features = ["test-util"]

[[example]]
name = "http_client_tokio"
path = "examples/http_client_tokio.rs"
required-features = [
    "tokio",
    "rustls",
]

[[test]]
name = "requests"
path = "tests/requests.rs"
required-features = [
    "tokio",
    "rustls",
    "test-util",
]

[[test]]
name = "resilience"
path = "tests/resilience.rs"
required-features = ["test-util"]

[[test]]
name = "standard_pipeline"
path = "tests/standard_pipeline.rs"
required-features = ["test-util"]

[[test]]
name = "thread_aware"
path = "tests/thread_aware.rs"
required-features = [
    "tokio",
    "rustls",
    "test-util",
]

[[test]]
name = "timeout"
path = "tests/timeout.rs"
required-features = ["test-util"]

[[test]]
name = "uri_handling"
path = "tests/uri_handling.rs"
required-features = ["test-util"]

[[bench]]
name = "http_crate"
path = "benches/http_crate.rs"
harness = false
required-features = ["test-util"]

[[bench]]
name = "pipelines"
path = "benches/pipelines.rs"
harness = false
required-features = ["test-util"]

[dependencies.anyspawn]
version = "0.5.3"
optional = true
default-features = false

[dependencies.bytes]
version = "1.11.1"
default-features = false

[dependencies.bytesbuf]
version = "0.5.3"
default-features = false

[dependencies.data_privacy]
version = "0.12.0"
default-features = false

[dependencies.fetch_hyper]
version = "0.3.4"
optional = true
default-features = false

[dependencies.fetch_options]
version = "0.2.1"
default-features = false

[dependencies.fetch_tls]
version = "0.2.2"
default-features = false

[dependencies.fundle]
version = "0.3.2"
default-features = false

[dependencies.futures]
version = "0.3.31"
features = ["std"]
default-features = false

[dependencies.http]
version = "1.4.1"
features = ["std"]
default-features = false

[dependencies.http_extensions]
version = "0.5.1"
default-features = false

[dependencies.hyper-util]
version = "0.1.20"
features = ["client-legacy"]
optional = true
default-features = false

[dependencies.layered]
version = "0.3.2"
features = [
    "dynamic-service",
    "intercept",
]
default-features = false

[dependencies.native-tls]
version = "0.2.18"
features = ["alpn"]
optional = true
default-features = false

[dependencies.ohno]
version = "0.3.5"
default-features = false

[dependencies.opentelemetry]
version = "0.32.0"
features = [
    "futures",
    "metrics",
]
default-features = false

[dependencies.opentelemetry-semantic-conventions]
version = "0.32.0"
features = ["semconv_experimental"]
default-features = false

[dependencies.rustls]
version = "0.23.40"
features = [
    "tls12",
    "std",
]
optional = true
default-features = false

[dependencies.rustls-platform-verifier]
version = "0.7.0"
optional = true
default-features = false

[dependencies.seatbelt]
version = "0.5.5"
features = [
    "timeout",
    "retry",
    "breaker",
    "hedging",
    "logs",
    "metrics",
]
default-features = false

[dependencies.seatbelt_http]
version = "0.3.1"
features = [
    "timeout",
    "retry",
    "breaker",
    "hedging",
]
default-features = false

[dependencies.serde]
version = "1.0.228"
optional = true
default-features = false

[dependencies.smallvec]
version = "1.15.1"
default-features = false

[dependencies.templated_uri]
version = "0.3.0"
features = ["uuid"]
default-features = false

[dependencies.thread_aware]
version = "0.7.3"
features = ["derive"]
default-features = false

[dependencies.tick]
version = "0.3.3"
default-features = false

[dependencies.tokio]
version = "1.48.0"
features = [
    "rt",
    "net",
]
optional = true
default-features = false

[dependencies.tracing]
version = "0.1.41"
default-features = false

[dev-dependencies.alloc_tracker]
version = "0.5.9"
default-features = false

[dev-dependencies.argh]
version = "0.1.13"
default-features = false

[dev-dependencies.criterion]
version = "0.8.1"
default-features = false

[dev-dependencies.fastrand]
version = "2.3.0"
features = ["std"]
default-features = false

[dev-dependencies.hyper]
version = "1.10.1"
features = [
    "http2",
    "client",
]
default-features = false

[dev-dependencies.hyper-util]
version = "0.1.20"
features = [
    "tokio",
    "http1",
    "http2",
    "client-legacy",
]
default-features = false

[dev-dependencies.insta]
version = "1.44.1"
default-features = false

[dev-dependencies.mutants]
version = "0.0.3"
default-features = false

[dev-dependencies.native-tls]
version = "0.2.18"
features = ["alpn"]
default-features = false

[dev-dependencies.opentelemetry-stdout]
version = "0.32.0"
features = ["metrics"]
default-features = false

[dev-dependencies.opentelemetry_sdk]
version = "0.32.0"
features = [
    "metrics",
    "testing",
]
default-features = false

[dev-dependencies.rstest]
version = "0.26.0"
default-features = false

[dev-dependencies.rustls]
version = "0.23.40"
features = [
    "tls12",
    "std",
    "aws-lc-rs",
]
default-features = false

[dev-dependencies.rustls-platform-verifier]
version = "0.7.0"
default-features = false

[dev-dependencies.serde]
version = "1.0.228"
features = ["derive"]
default-features = false

[dev-dependencies.serde_json]
version = "1.0.145"
default-features = false

[dev-dependencies.static_assertions]
version = "1.1.0"
default-features = false

[dev-dependencies.tokio]
version = "1.48.0"
features = [
    "macros",
    "rt-multi-thread",
    "rt",
    "net",
]
default-features = false

[dev-dependencies.tracing-appender]
version = "0.2.5"
default-features = false

[dev-dependencies.tracing-subscriber]
version = "0.3.20"
features = ["env-filter"]
default-features = false

[dev-dependencies.uuid]
version = "1.21.0"
default-features = false

[dev-dependencies.wiremock]
version = "0.6.5"
default-features = false

[lints.clippy]
allow_attributes = "warn"
allow_attributes_without_reason = "warn"
as_pointer_underscore = "warn"
assertions_on_result_states = "warn"
clone_on_ref_ptr = "warn"
deref_by_slicing = "warn"
disallowed_script_idents = "warn"
empty_drop = "warn"
empty_enum_variants_with_brackets = "warn"
empty_structs_with_brackets = "warn"
fn_to_numeric_cast_any = "warn"
if_then_some_else_none = "warn"
map_err_ignore = "warn"
missing_const_for_fn = "allow"
multiple_crate_versions = "allow"
multiple_unsafe_ops_per_block = "warn"
option_if_let_else = "allow"
panic = "warn"
redundant_pub_crate = "allow"
redundant_type_annotations = "warn"
renamed_function_params = "warn"
semicolon_outside_block = "warn"
should_panic_without_expect = "allow"
significant_drop_tightening = "allow"
undocumented_unsafe_blocks = "warn"
unnecessary_safety_comment = "warn"
unnecessary_safety_doc = "warn"
unneeded_field_pattern = "warn"
unused_result_ok = "warn"
unwrap_used = "warn"
wildcard_imports = "allow"

[lints.clippy.cargo]
level = "warn"
priority = -1

[lints.clippy.complexity]
level = "warn"
priority = -1

[lints.clippy.correctness]
level = "warn"
priority = -1

[lints.clippy.nursery]
level = "warn"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.clippy.perf]
level = "warn"
priority = -1

[lints.clippy.style]
level = "warn"
priority = -1

[lints.clippy.suspicious]
level = "warn"
priority = -1

[lints.rust]
ambiguous_negative_literals = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
redundant_imports = "warn"
redundant_lifetimes = "warn"
trivial_numeric_casts = "warn"
unsafe_op_in_unsafe_fn = "warn"
unused_lifetimes = "warn"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
    "cfg(coverage,coverage_nightly)",
    "cfg(loom)",
]

[lints.rustdoc]
missing_crate_level_docs = "warn"
unescaped_backticks = "warn"
