layered 0.3.0

Build composable async services with layered middleware.
Documentation
# 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.88"
name = "layered"
version = "0.3.0"
authors = ["The Oxidizer Project Authors"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Build composable async services with layered middleware."
homepage = "https://github.com/microsoft/oxidizer"
readme = "README.md"
keywords = [
    "oxidizer",
    "service",
    "middleware",
    "layer",
    "compose",
]
categories = ["data-structures"]
license = "MIT"
repository = "https://github.com/microsoft/oxidizer"
resolver = "2"

[package.metadata.docs.rs]
all-features = true

[package.metadata.cargo_check_external_types]
allowed_external_types = [
    "tower_layer::Layer",
    "tower_service::Service",
]

[features]
default = []
dynamic-service = ["dep:dynosaur"]
intercept = []
tower-service = ["dep:tower-service"]

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

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

[[example]]
name = "service_basic"
path = "examples/service_basic.rs"
required-features = ["intercept"]

[[example]]
name = "tower_compatibility"
path = "examples/tower_compatibility.rs"
required-features = [
    "tower-service",
    "intercept",
]

[[bench]]
name = "dynamic"
path = "benches/dynamic.rs"
harness = false
required-features = [
    "dynamic-service",
    "intercept",
]

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

[[bench]]
name = "tower"
path = "benches/tower.rs"
harness = false
required-features = [
    "intercept",
    "tower-service",
]

[dependencies.dynosaur]
version = "0.3.0"
optional = true
default-features = false

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

[dependencies.tower-service]
version = "0.3.3"
optional = true
default-features = false

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

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

[dev-dependencies.dynosaur]
version = "0.3.0"
default-features = false

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

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

[dev-dependencies.pin-project-lite]
version = "0.2.13"
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",
]
default-features = false

[dev-dependencies.tower]
version = "0.5.2"
features = [
    "limit",
    "util",
]
default-features = false

[dev-dependencies.tower-service]
version = "0.3.3"
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)"]

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