rusty_alloc-api 1.0.0

Safe Rust surface for the rusty_alloc pure-Rust mimalloc remake: GlobalAlloc, first-class Heap, and the Allocator trait. No unsafe required of callers. MIT.
Documentation
# rusty_alloc-api

The safe Rust surface over [`rusty_alloc`](https://crates.io/crates/rusty_alloc),
a pure-Rust remake of mimalloc that measures at-or-below mimalloc on
instructions retired for real programs (lua 0.97x, perl 1.00x, sqlite 1.00x) and
below jemalloc across the board (lua 0.85x, perl 0.90x, sqlite 0.98x), while
detecting double frees that upstream silently accepts and carrying no data race
on its free path.

**Status: `1.0.0` — the API is frozen.** See the
[`rusty_alloc`](https://crates.io/crates/rusty_alloc) crate page for the
performance evidence and its scope (instruction counts, not wall-clock).

> **Upgrade from 0.3.x or earlier — mandatory.** 0.4.0 fixed three
> platform-independent use-after-frees; treat 0.3.2 and earlier as unsound on
> every target.

## What it gives you

- **`GlobalAlloc`** — drop it in as `#[global_allocator]`.
- **First-class heaps** — create independent heaps, allocate from them, destroy
  them wholesale.
- **`Allocator`** — the unstable `allocator_api` trait, behind a feature.

```rust
use rusty_alloc_api::RustyAlloc;

#[global_allocator]
static ALLOC: RustyAlloc = RustyAlloc;

fn main() {
    let v: Vec<u64> = (0..1000).collect();
    println!("{}", v.len());
}
```

## Features

`debug_checks`, `secure`, `profile` — each forwards to the identically-named
feature on `rusty_alloc`.

Security: [threat model](https://github.com/remade-with-rust/rusty_alloc/blob/main/docs/threat-model.md)
· [disclosure policy](https://github.com/remade-with-rust/rusty_alloc/blob/main/SECURITY.md).

## License

MIT. See `LICENSE` at the repository root.

---

<!-- HARDENING-TABLE:BEGIN generated by use-protection-please — edit docs/plans/use-protection-please.md, not this block -->
## Hardening status

**Tier** standard · **Audited** 2026-08-19 (survey) · **v1.0.0 gates** 12/12 · [Full checklist](https://github.com/remade-with-rust/rusty_alloc/blob/main/crates/rusty_alloc_api/docs/plans/use-protection-please.md)

`███████████████████░` **95%** &nbsp;·&nbsp; 21 Completed · 0 Scheduled · 1 Incomplete · 33 N/A

| Phase | ✅ Completed | 🗓 Scheduled | ⬜ Incomplete | · N/A |
|---|--:|--:|--:|--:|
| 0 — Threat modeling | 1 | 0 | 0 | 1 |
| 1 — Toolchain | 4 | 0 | 0 | 0 |
| 2 — Supply chain | 6 | 0 | 0 | 2 |
| 3 — Code level | 4 | 0 | 0 | 3 |
| 4 — Static analysis | 0 | 0 | 0 | 1 |
| 5 — Dynamic analysis | 1 | 0 | 0 | 2 |
| 6 — Fuzzing and properties | 1 | 0 | 0 | 3 |
| 7 — Formal verification | 0 | 0 | 0 | 1 |
| 8 — Build and binary | 0 | 0 | 0 | 2 |
| 9 — Runtime privilege | 0 | 0 | 0 | 1 |
| 10 — Cryptography | 0 | 0 | 0 | 3 |
| 11 — CI/CD, release, and operations | 4 | 0 | 1 | 0 |
| 12 — Compliance controls | 0 | 0 | 0 | 14 |
| **Total** | **21** | **0** | **1** | **33** |

**Architect** — Tim — Mata Network
<!-- HARDENING-TABLE:END -->