rusty_alloc-api 2.0.1

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 0.99x, sqlite 1.00x) and
below jemalloc across the board (lua 0.84x, perl 0.89x, 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).

## The Remade With Rust ecosystem

<!-- ORG BOILERPLATE — keep identical across repos -->

**Remade With Rust** is an initiative by **[Mata Network](https://www.mata.network/)**
to rebuild essential C and C++ tools in Rust — for the memory safety, the
predictable performance, and the freedom of a permissive license. Each project
is a reimplementation, not a fork: same wire protocols and file formats, new
code you can actually depend on.

We build the core to production grade and open-source it so the community can
extend it. No copyleft. No surprises. Just the tools we rely on, made faster and
safer.

| Project | What it is |
|---|---|
| 🎬 **[remade_ffmpeg_rs]https://github.com/Remade-With-Rust/remade_ffmpeg_rs** | **Our FFmpeg alternative.** Drop-in `ffmpeg` and `ffprobe` binaries — demux → decode → filter → encode → mux, rebuilt as composable Rust crates with **zero GPL/LGPL**. Apache-2.0. `rusty_h264` is its H.264 codec. |
| 🧠 **[FFAI]https://github.com/Remade-With-Rust/FFAI** | **Our sister project: media *for* AI.** "The AI media toolkit, remade with rust." Embedded ASR + TTS (**Mercury**), OCR (**Carmenta**) and vision-language captioning (**Argus**) behind an ffmpeg-style, swap-by-name architecture — no Python, no CUDA. MIT OR Apache-2.0. |
| 🌐 **[Mata Network]https://www.mata.network/** | **The home page.** *"Stop sacrificing your privacy for convenience."* Sovereign, self-hostable privacy infrastructure — wallet & identity, password manager, contact manager, and a browser extension that stops information leaking as you browse. Remade With Rust is its open-source arm. |

→ All projects: **[github.com/Remade-With-Rust](https://github.com/Remade-With-Rust)**

<!-- /ORG BOILERPLATE -->

## 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 -->