trustmebro-macro

Crates.iotrustmebro-macro
lib.rstrustmebro-macro
version0.1.0
created_at2025-11-18 20:09:02.849447+00
updated_at2025-11-18 20:09:02.849447+00
descriptionA macro that wraps arbitrary tokens in an unsafe block
homepage
repositoryhttps://github.com/tristanpoland/TrustMeBro
max_upload_size
id1938955
size5,494
Tristan Poland (Trident_For_U) (tristanpoland)

documentation

README

TrustMeBro

A Rust macro that wraps arbitrary tokens in an unsafe block. Because sometimes you just need the compiler to trust you.

Installation

Add this to your Cargo.toml:

[dependencies]
trustmebro = "0.1.0"

Usage

use trustmebro::trustmebro;

let mut x = 5;
let ptr = &mut x as *mut i32;

trustmebro! {
    *ptr = 10;
}

assert_eq!(x, 10);

Why?

This macro is a humorous way to write unsafe blocks. Instead of:

unsafe {
    // dangerous code here
}

You can write:

trustmebro! {
    // dangerous code here
}

Safety

This macro provides no additional safety guarantees. It simply wraps your code in an unsafe block. Use responsibly and ensure you understand Rust's safety requirements when working with unsafe code.

License

Licensed under either of:

at your option.

Commit count: 0

cargo fmt