wazabin-jstd 0.2.1

Typed identifiers, registries, graph containers with dominator/SESE analysis, string interning, and stable arenas
Documentation
//! Small, reusable Rust building blocks, extracted from a binary-analysis
//! toolchain and kept dependency-light.
//!
//! - [`registry`] — strongly typed `usize` identifiers ([`Identifier`]) and
//!   id-indexed registries, so a `NodeId` cannot be passed where an `EdgeId`
//!   belongs.
//! - [`recycling_arena`] — typed slab storage that reuses removed slots.
//! - [`graph`] — directed graph containers, plus [`graph::analysis`] for
//!   dominator and post-dominator trees and canonical edge-based SESE
//!   (single-entry/single-exit) region decomposition.
//! - [`stable_arena`] — an arena whose elements keep their address as it grows.
//! - [`intern`] — string interning.
//! - [`num_ref`] — small numeric reference helpers.
//!
//! Layered graph *layout* lives in the separate `wazabin-triskel` crate, which
//! builds on [`graph`].

extern crate self as jstd;

/// Derive macro for strongly typed `usize` identifiers.
///
/// This derive is intended for tuple newtypes with exactly one `usize` field,
/// and generates implementations for:
/// - `Copy`, `Clone`, `Debug`, `Default`, `PartialEq`, `Eq`, `Hash`
/// - `From<usize>` and `From<Self> for usize`
/// - [`registry::Identifier`]
///
/// # Example
/// ```
/// use jstd::Identifier;
///
/// #[derive(Identifier)]
/// pub struct MyId(usize);
///
/// let id = MyId::from(42usize);
/// let raw: usize = id.into();
/// assert_eq!(raw, 42);
/// assert_eq!(MyId::default(), MyId::from(0usize));
/// ```
pub use jstd_derive::Identifier;

pub mod graph;
pub mod intern;
pub mod log;
pub mod num_ref;
pub mod recycling_arena;
pub mod registry;
pub mod stable_arena;