rust-ffi

Provide FFI guidelines for calling C from Rust and exposing Rust APIs.

1|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/vanyastaff/paramdef --skill rust-ffi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-ffi
Source: https://github.com/vanyastaff/paramdef/tree/main/.claude/skills/rust-ffi
Command: npx skills add https://github.com/vanyastaff/paramdef --skill rust-ffi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides guidelines for Foreign Function Interface (FFI) with C/C++, including safe invocation patterns and transparent exposure of Rust APIs.

Core Features & Use Cases

  • Calling C from Rust: extern blocks and safe wrappers.
  • Exposing Rust to C: safe, documented extern "C" entry points.
  • Memory & ABI: repr(C), opaque types, and safe ownership transfers.
  • Use Case: Create a small Rust library that can be consumed by a C app.

Quick Start

Implement a safe_strlen wrapper around an unsafe C strlen and expose a minimal extern "C" function.