pool-mod 1.0.0

Generic object and connection pooling. Async-safe with min/max sizing, idle timeouts, max-lifetime enforcement, validation-on-borrow, and health-check callbacks. Works for database connections, HTTP clients, worker threads, or any expensive resource.
Documentation
[package]
name = "pool-mod"
version = "1.0.0"
edition = "2021"
rust-version = "1.75"
readme = "README.md"
license = "Apache-2.0 OR MIT"

authors = [
    "James Gober <me@jamesgober.com>"
]

description = "Generic object and connection pooling. Async-safe with min/max sizing, idle timeouts, max-lifetime enforcement, validation-on-borrow, and health-check callbacks. Works for database connections, HTTP clients, worker threads, or any expensive resource."

keywords = [
    "pool",
    "connection-pool",
    "object-pool",
    "resource",
    "rust"
]

categories = [
    "asynchronous",
    "rust-patterns"
]

documentation = "https://docs.rs/pool-mod"
repository    = "https://github.com/jamesgober/pool-mod"
homepage      = "https://github.com/jamesgober/pool-mod"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

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

[features]
default = ["std"]
std = []

[dependencies]

[dev-dependencies]
# Property-based tests for the pool's sizing and lifecycle invariants.
proptest = "1"
# Microbenchmarks for the acquire/return hot path. Default features are disabled
# to keep the dev-dependency tree (and the MSRV surface) small.
criterion = { version = "0.5", default-features = false, features = ["cargo_bench_support"] }

# The committed `Cargo.lock` pins this dev-dependency tree to versions that still
# build on the MSRV (Rust 1.75). Newer releases of these crates require a newer
# compiler; they are dev-only and never reach published consumers. Re-pin with
# `cargo update -p <crate> --precise <ver>` if you bump the MSRV.

[[bench]]
name = "pool"
harness = false
required-features = ["std"]

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = "symbols"

[profile.bench]
opt-level = 3
lto = "fat"
codegen-units = 1
debug = true