Rust FFI Purpose Guide agents through Rust's Foreign Function Interface: calling C from Rust with bindgen, exporting Rust to C with cbindgen, writing safe wrappers, linking libraries via , and structuring sys crates. Triggers - "How do I call a C library from Rust?" - "How do I use bindgen to generate Rust bindings?" - "How do I export Rust functions to be called from C?" - "How do I write a safe wrapper around an unsafe C API?" - "How do I link a system library in Rust?" - "What is a sys crate and how do I structure one?" Workflow 1. Calling C without bindgen (manual declarations) 2. bindgen…