rust-unsafe-and-ffi
Installation
SKILL.md
Rust Unsafe and FFI
Use this when the code must uphold invariants the compiler cannot check.
Working stance
- Safe wrapper first;
unsafeis the narrow implementation detail. - Write the invariant list before writing the block.
- Every
unsafeblock should justify itself in plain language. - FFI boundaries must define ownership, lifetime, layout, and panic policy.
- If a safe design is available and fast enough, prefer it.