finds.dev← search

// the find

purpleprotocol/mimalloc_rust

★ 795 · Rust · MIT · updated May 2026

A Rust wrapper over Microsoft's MiMalloc memory allocator

A thin Rust wrapper that lets you swap in Microsoft's mimalloc as your global allocator with two lines of code. Mimalloc consistently outperforms the system allocator in throughput-heavy workloads, so this is useful for servers, CLI tools, or anything doing lots of small allocations. The wrapper itself is mostly scaffolding — the real work is in the bundled C source.

Truly drop-in: `#[global_allocator]` is all you need, no API surface to learn. Ships both v2 and v3 mimalloc as submodules so you're not at the mercy of system packages. Secure mode (guard pages, encrypted free lists) is a feature-flag away, useful for security-sensitive workloads. CI is active and the crate tracks upstream mimalloc releases reasonably well.

Requires a C compiler at build time — not a blocker but it breaks pure-Rust build environments and musl static builds need extra care. The extended API (`src/extended.rs`) exposes raw mimalloc internals with almost no documentation, so you're reading the upstream C headers to understand what you're calling. No async-friendly allocation hints or arena support exposed to Rust callers. At 795 stars it's the de facto option but the crate is thinly maintained — one or two contributors doing periodic upstream bumps, not a actively developed project.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →