mod-alloc 0.9.3

Allocation profiling for Rust. Counters, peak resident, and call-site grouping with inline backtrace capture. Zero external dependencies in the hot path. Lean dhat replacement targeting MSRV 1.75.
Documentation
[package]
name = "mod-alloc"
version = "0.9.3"
edition = "2021"
rust-version = "1.75"
readme = "README.md"
license = "Apache-2.0"
build = "build.rs"

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

description = "Allocation profiling for Rust. Counters, peak resident, and call-site grouping with inline backtrace capture. Zero external dependencies in the hot path. Lean dhat replacement targeting MSRV 1.75."

keywords = [
    "memory-profiling",
    "allocator",
    "profiler",
    "heap",
    "alloc"
]

categories = [
    "development-tools::profiling",
    "memory-management"
]

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

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

[dependencies]
# v0.9.2 `symbolicate` opt-in: approved external-dep exception
# per `.dev/DIRECTIVES.md` section 2.2. Default builds and the
# allocation hot path remain zero-runtime-dep.
# `std-object` is the addr2line feature that wires the
# `Context::new(&object_file)` constructor + the `EndianRcSlice`
# default reader; without it, only `Context::from_dwarf` is
# available and `EndianRcSlice` is not exposed.
addr2line = { version = "0.21", optional = true, default-features = false, features = ["std", "rustc-demangle", "std-object"] }
object = { version = "0.32", optional = true, default-features = false, features = ["read", "std"] }
rustc-demangle = { version = "0.1", optional = true }

[target.'cfg(windows)'.dependencies]
pdb = { version = "0.8", optional = true }
# Pin uuid to a version compatible with our MSRV 1.75. `pdb`
# pulls `uuid` in transitively; without this pin Cargo resolves
# the latest 1.x which currently requires rustc 1.85+. The pinned
# version supports MSRV 1.63 per the uuid crate's policy.
uuid = { version = "=1.10.0", optional = true }

[dev-dependencies]

[features]
default = ["std", "counters"]
std = []
counters = ["std"]
backtraces = ["std"]
dhat-compat = ["std", "backtraces"]
symbolicate = ["std", "backtraces", "dep:addr2line", "dep:object", "dep:rustc-demangle", "dep:pdb", "dep:uuid"]

[profile.release]
opt-level = 3
lto = "thin"