dependency-injector 2.0.0

High-performance, lock-free dependency injection container for Rust
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.85"
name = "dependency-injector"
version = "2.0.0"
build = false
exclude = [
    ".cursor/",
    ".github/",
    ".vscode/",
    ".idea/",
    ".cargo-husky/",
    "docs/",
    "ffi/",
    "benches/",
    "benchmarks/",
    "*.bench.rs",
    "BENCHMARK_COMPARISON.md",
    "RUST_DI_COMPARISON.md",
    "examples/memory_profiler.rs",
    "scripts/",
    "*.profraw",
    "*.profdata",
    "dhat-heap.json",
    "flamegraph.svg",
    ".gitignore",
    ".gitattributes",
    "codecov.yml",
    "rustfmt.toml",
    "clippy.toml",
    ".editorconfig",
    "TODO.md",
    "CONTRIBUTING.md",
    "SECURITY.md",
    "*.bak",
    "*.orig",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "High-performance, lock-free dependency injection container for Rust"
documentation = "https://docs.rs/dependency-injector"
readme = "README.md"
keywords = [
    "dependency-injection",
    "di",
    "ioc",
    "container",
    "service-locator",
]
categories = [
    "development-tools",
    "rust-patterns",
    "concurrency",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/pegasusheavy/dependency-injector"

[features]
async = ["dep:tokio"]
default = ["logging"]
derive = ["dep:dependency-injector-derive"]
dhat-heap = ["dep:dhat"]
ffi = []
logging = ["dep:tracing"]
logging-json = [
    "logging",
    "dep:tracing-subscriber",
    "tracing-subscriber/json",
]
logging-pretty = [
    "logging",
    "dep:tracing-subscriber",
]
perfect-hash = ["dep:boomphf"]
tracing = ["logging"]

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

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

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

[[test]]
name = "typed_require"
path = "tests/typed_require.rs"

[dependencies.ahash]
version = "0.8"

[dependencies.boomphf]
version = "0.6"
optional = true

[dependencies.dashmap]
version = "6"

[dependencies.dependency-injector-derive]
version = "2.0.0"
optional = true

[dependencies.dhat]
version = "0.3"
optional = true

[dependencies.once_cell]
version = "1.19"

[dependencies.thiserror]
version = "2.0"

[dependencies.tokio]
version = "1.0"
features = ["sync"]
optional = true

[dependencies.tracing]
version = "0.1"
optional = true

[dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]
optional = true

[dev-dependencies.cargo-husky]
version = "1"
features = ["user-hooks"]
default-features = false

[dev-dependencies.criterion]
version = "0.8.0"
features = ["html_reports"]

[dev-dependencies.ferrous-di]
version = "0.2"

[dev-dependencies.shaku]
version = "0.6"

[dev-dependencies.tokio]
version = "1.0"
features = [
    "rt-multi-thread",
    "macros",
    "time",
]

[profile.profiling]
debug = 2
inherits = "release"
strip = false

[profile.sanitizer]
opt-level = 1
inherits = "dev"