ffi-diplomat

Official

Expose Rust types to C/C++ and WASM with Diplomat

Authornovelsaga
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Expose Rust types to C/C++ and WASM through a structured Diplomat FFI binding pattern. The approach reduces boilerplate and error-prone hand-written bindings across language boundaries.

Core Features & Use Cases

  • Single bridge module: All FFI definitions are centralized in one #[diplomat::bridge] module.
  • Safe opaque types: Use #[diplomat::opaque] wrappers to encapsulate internal Rust types.
  • Robust string IO: Employ DiplomatStr and DiplomatWrite for cross-language string handling.

Quick Start

Create a single #[diplomat::bridge] module that exposes the public Rust types to C/C++ and WASM.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: ffi-diplomat
Download link: https://github.com/novelsaga/NSaga/archive/main.zip#ffi-diplomat

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.