Skip to main content

arena_lib/
lib.rs

1//! # arena-lib
2//!
3//! TYPED MEMORY ARENAS AND SLAB ALLOCATION
4//!
5//! Generational indices, typed arenas, interned strings, bump allocation. Zero unsafe leakage into user code.
6//!
7//! # Status
8//!
9//! Early scaffolding (v0.1.0). The public API is being designed for the 1.0 release.
10//! The crate currently compiles and exposes [`VERSION`] only. See
11//! [the repository](https://github.com/jamesgober/arena-lib) for the milestone plan.
12//!
13//! # License
14//!
15//! Dual-licensed under Apache-2.0 OR MIT.
16
17#![doc(html_root_url = "https://docs.rs/arena-lib")]
18#![cfg_attr(docsrs, feature(doc_cfg))]
19#![cfg_attr(not(feature = "std"), no_std)]
20#![deny(missing_docs)]
21#![deny(unsafe_op_in_unsafe_fn)]
22#![deny(unused_must_use)]
23#![deny(unused_results)]
24#![deny(clippy::unwrap_used)]
25#![deny(clippy::expect_used)]
26#![deny(clippy::todo)]
27#![deny(clippy::unimplemented)]
28#![deny(clippy::print_stdout)]
29#![deny(clippy::print_stderr)]
30#![deny(clippy::dbg_macro)]
31#![deny(clippy::undocumented_unsafe_blocks)]
32#![deny(clippy::missing_safety_doc)]
33
34/// Crate version string, populated by Cargo at build time.
35///
36/// Matches the `version` field in `Cargo.toml` exactly. Useful for diagnostics,
37/// telemetry, and `--version` output in tools that embed `arena-lib`.
38///
39/// # Examples
40///
41/// ```
42/// use arena_lib::VERSION;
43///
44/// assert!(!VERSION.is_empty());
45/// assert!(VERSION.chars().next().is_some_and(|c| c.is_ascii_digit()));
46/// ```
47pub const VERSION: &str = env!("CARGO_PKG_VERSION");