rust-unsafe-ffi
Installation
SKILL.md
Rust Unsafe & FFI Programming
Comprehensive guide to unsafe Rust and Foreign Function Interface (FFI) programming based on The Rustonomicon, Unsafe Code Guidelines, and bindgen documentation.
When to Use This Skill
- Writing unsafe Rust code with raw pointers
- Interfacing with C/C++ libraries via FFI
- Creating Rust bindings to C/C++ libraries with bindgen
- Implementing zero-cost abstractions over unsafe code
- Working with uninitialized or untyped memory
- Understanding the boundary between safe and unsafe Rust
- Writing sound unsafe code that doesn't cause undefined behavior
Core References
- The Rustonomicon - The definitive guide to unsafe Rust
- Unsafe Code Guidelines - What unsafe code can and cannot do
- bindgen User Guide - Automatic FFI binding generation