Rust Unsafe

Disciplined unsafe Rust — five superpowers (dereference raw pointer *const/*mut, call unsafe fn/method, access/modify mutable static, implement unsafe trait, access union fields), SAFETY comment invariants, minimizing unsafe scope, wrapping unsafe in safe abstractions, undefined behavior (UB) taxonomy (null deref, dangling pointer, data race, invalid transmute, aliasing violation), static mut → OnceLock/atomic migration, std::mem::transmute misuse detection, unsafe impl Send/Sync soundness, FFI/extern boundary discipline, union field access. Auto-triggers on ANY `unsafe` block/fn, any raw-pointer deref (*const/*mut), any `static mut`, any `std::mem::transmute`, any FFI/`extern` boundary, any `unsafe impl`. Use when this capability is needed.

tomevault-io Updated

File contents

tomevault-io/skills-registry/tree/main/adelabdelgawad--rust-fullstack-agents--rust-unsafe commit d8ffbcfdeb

Frequently asked questions

npx skillmds@latest add tomevault-io/rust-unsafe-2