What problem does it solve?
This Skill helps engineers port a C module to Rust by providing a structured, step-by-step guide that covers analysis, planning, Rust crate creation, FFI integration, and testing to reduce porting risk and improve safety.
Core Features & Use Cases
- Porting plan framework: Create a porting plan document detailing decisions, interfaces, and migration milestones.
- Rust crate scaffolding: Set up a pure Rust crate to host the ported logic and safe abstractions over the C API.
- FFI boundary and interop: Implement a robust C-FFI wrapper to expose Rust functionality to the C codebase and replace or wrap legacy calls.
- Testing and integration: Provide guidance to run unit and integration tests to validate behavior across languages.
Quick Start
Port the C module to Rust by creating a new Rust crate, adding a porting plan, implementing the Rust logic, creating an FFI boundary, and wiring it into the C build system, then run tests.