[package]
edition = "2024"
name = "commonware-allocator"
version = "2026.9.0"
build = "build.rs"
links = "mimalloc"
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Allocate and manage memory."
homepage = "https://commonware.xyz"
documentation = "https://docs.rs/commonware-allocator"
readme = "README.md"
license = "(MIT OR Apache-2.0) AND MIT"
repository = "https://github.com/commonwarexyz/monorepo/tree/main/allocator"
resolver = "2"
[features]
default = ["mimalloc"]
large-objects-1mb = []
large-objects-2mb = []
large-objects-4mb = []
local-dynamic-tls = []
mimalloc = ["dep:libc"]
[lib]
name = "commonware_allocator"
path = "src/lib.rs"
[[test]]
name = "arena_object_limit"
path = "tests/arena_object_limit.rs"
[[test]]
name = "arena_object_limit_floor"
path = "tests/arena_object_limit_floor.rs"
[[test]]
name = "config_options"
path = "tests/config_options.rs"
[[test]]
name = "huge_page_advice_pinned"
path = "tests/huge_page_advice_pinned.rs"
[[test]]
name = "huge_page_advice_unpinned"
path = "tests/huge_page_advice_unpinned.rs"
[dependencies.commonware-macros]
version = "2026.9.0"
features = ["std"]
default-features = false
[dependencies.libc]
version = "0.2.186"
optional = true
[build-dependencies.cc]
version = "1.2.67"
[lints.clippy]
disallowed_macros = "deny"
disallowed_methods = "deny"
disallowed_types = "deny"
large_futures = "warn"
missing_const_for_fn = "warn"
multiple_inherent_impl = "deny"
option_if_let_else = "warn"
redundant_clone = "warn"
suspicious_op_assign_impl = "allow"
undocumented_unsafe_blocks = "deny"
unused_async = "warn"
use_self = "warn"
[lints.rust]
unused_must_use = "deny"
warnings = "deny"
[lints.rust.rust_2018_idioms]
level = "deny"
priority = -1
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
"cfg(full_bench)",
"cfg(huge_bench)",
"cfg(benchmark_tracking)",
"cfg(generate_conformance_tests)",
"cfg(commonware_stability_BETA)",
"cfg(commonware_stability_GAMMA)",
"cfg(commonware_stability_DELTA)",
"cfg(commonware_stability_EPSILON)",
"cfg(commonware_stability_RESERVED)",
]