rust-bindings

Outline workspace architectures and binding strategies for polyglot Rust extensions.

15|4|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/cofin/flow --skill rust-bindings
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-bindings
Source: https://github.com/cofin/flow/tree/main/skills/rust-bindings
Command: npx skills add https://github.com/cofin/flow --skill rust-bindings

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide and architectural patterns for creating robust, polyglot Rust extensions, enabling seamless integration with various programming languages.

Core Features & Use Cases

  • Multi-language Support: Develop bindings for Python (PyO3/Maturin), Node.js/Bun (napi-rs), and C ABI.
  • Workspace Architecture: Structure your Rust project for maintainability with separate core logic and binding layers.
  • Cross-Platform Distribution: Strategies for building and distributing wheels and npm packages.
  • Use Case: You need to expose a high-performance Rust library to Python and Node.js applications, ensuring consistent behavior and efficient data transfer across language boundaries.

Quick Start

Use the rust-bindings skill to create Python bindings for a Rust core library using PyO3 and maturin.

Frequently Asked Questions about rust-bindings

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create Python bindings for a Rust library using PyO3 and maturin?

Testing polyglot Rust extensions involves validating behavior and mapping errors across language interfaces. This Skill outlines strategies to address testing and error mapping when integrating Rust with Python and Node.js.

Can I use napi-rs to build Node.js and Bun bindings for a Rust library?

Yes, you can use napi-rs to build Node.js and Bun bindings for a Rust library. This Skill details how to structure your workspace architecture and implement language-specific binding strategies for the Node.js ecosystem.

What is the best way to structure a polyglot Rust project for multiple language bindings?

The best way to structure a polyglot Rust project is using a workspace architecture that separates core logic from language-specific binding layers. This ensures maintainability and consistent behavior across Python and Node.js boundaries.

How does a C ABI help with cross-platform Rust extension distribution?

A C ABI facilitates cross-platform Rust extension distribution by providing a universal foreign function interface. This Skill covers using a C ABI alongside PyO3 and napi-rs to ensure broad compatibility and efficient data transfer.

How do I handle error mapping across Rust and Python boundaries with PyO3?

Error mapping across Rust and Python boundaries requires translating Rust panic and Result types into Python exceptions using PyO3. This Skill addresses testing and error mapping strategies across language interfaces.