#malloc #framework #building #macos #hoard

nightly mallockit

A framework for building malloc implementations in Rust

2 unstable releases

0.1.0 Sep 27, 2025
0.0.0 Mar 13, 2024

#1419 in Machine learning

Download history 5/week @ 2025-10-06 7/week @ 2025-10-13 3/week @ 2025-10-20

63 downloads per month

MIT license

165KB
4.5K SLoC

MallocKit

Getting Started

$ cargo build -p hoard --release --features malloc
$ env LD_PRELOAD=./target/release/libhoard.so cargo --help # or some other command

Run on macOS

$ env DYLD_INSERT_LIBRARIES=./target/release/libhoard.dylib cargo --help # or some other command

Note: If you'd like to hijack the system apps and libraries as well, disable System Integrity Protection (SIP). Do this at your own risk 😉

Tests

$ cargo test

TODO

  • Linux/x86_64 support
  • MacOS/x86_64 support
  • Windows/x86_64 support
  • Performance
  • Linux/aarch64 support
  • MacOS/aarch64 support (arm64 only. arm64e is currently unsupported)
  • Windows/aarch64 support
  • Rust allocator interface

Dependencies

~2.5–3.5MB
~71K SLoC