talc/
lib.rs

1//! The Talc allocator crate.
2//!
3//! For getting started:
4//! - Check out the crate's [README](https://github.com/SFBdragon/talc)
5//! - Read check out the `Talc` and `Talck` structures.
6//!
7//! Your first step will be `Talc::new(...)`, then `claim`.
8//! Calling `Talc::lock()` on it will yield a `Talck` which implements
9//! [`GlobalAlloc`] and [`Allocator`] (if the appropriate feature flags are set).
10
11#![cfg_attr(not(any(test, feature = "fuzzing")), no_std)]
12#![cfg_attr(feature = "allocator", feature(allocator_api))]
13
14mod oom_handler;
15mod ptr_utils;
16mod span;
17mod talc;
18
19#[cfg(feature = "lock_api")]
20pub mod locking;
21#[cfg(feature = "lock_api")]
22mod talck;
23
24pub use oom_handler::{ClaimOnOom, ErrOnOom, OomHandler};
25pub use span::Span;
26pub use talc::Talc;
27
28#[cfg(feature = "lock_api")]
29pub use talck::Talck;
30#[cfg(all(target_family = "wasm", feature = "lock_api"))]
31pub use talck::TalckWasm;
32
33#[cfg(all(target_family = "wasm", feature = "lock_api"))]
34pub use oom_handler::WasmHandler;