Malloced
A malloc-ed box pointer type for Rust
Install / Use
/learn @nvzqz/MallocedREADME
Malloced
A malloc-ed box pointer type, brought to you by
@NikolaiVazquez!
Table of Contents
Donate
If this project is useful to you, please consider sponsoring me or donating directly!
Doing so enables me to create high-quality open source software like this. ❤️
Usage
This library is available on crates.io and
can be used by adding the following to your project's
Cargo.toml:
[dependencies]
malloced = "1.3.1"
The star of the show is Malloced, Box-like pointer that calls free on
Drop:
use malloced::Malloced;
MSRV
This library's minimum supported Rust version (MSRV) is 1.64. A new version requirement would result in a minor version update.
FFI Safety
Malloced<T> is a #[repr(transparent)] wrapper over NonNull<T>, so it can
be safely used in C FFI. For example, the following is safe and even compiles
with the improper_ctypes lint enabled:
#[deny(improper_ctypes)]
extern "C" {
fn my_array_malloc() -> Malloced<[u8; 32]>;
}
Alternatives
License
This project is released under either MIT License or Apache License (Version 2.0) at your choosing.
Related Skills
himalaya
347.0kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
taskflow
347.0kname: taskflow description: Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layer
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
