8 releases
0.2.6 | Sep 3, 2022 |
---|---|
0.2.5 | Aug 8, 2022 |
0.2.3 | Jul 11, 2022 |
0.1.0 | Jun 3, 2022 |
#42 in #mut
Used in libsix
15KB
391 lines
unmem
Some memory working stuff.
Examples:
extern crate unmem;
use unmem::change;
fn main() {
let a: u8 = 6;
change(&a, 255);
println!("{a}"); // >> 255
}
extern crate unmem;
use unmem::get_mut;
fn main() {
let a: u8 = 15;
let mut mut_a = get_mut(&a);
*mut_a = 8;
println!("{a}"); // >> 8
}
lib.rs
:
unmem crate contains some interesting functions. I tried to make them as safe as possible. However, remember that even not marked as unsafe they still can be dangerous. All of these functions may cause UB!