make-moonbit-c-bindings

Installation
SKILL.md

Make MoonBit C Bindings

Use this skill for end-to-end binding projects. Also read moonbit-c-binding before implementation for low-level FFI syntax, ownership annotations, and moonbit.h details.

Quick Start

  1. Clone or inspect the upstream C/C++ project in a temporary directory.
  2. Identify the public header(s), generated config headers, source layout, allocator API, and build-time type widths.
  3. Decide the safe MoonBit API surface; do not mechanically expose every C API.
  4. Vendor sources with templates/prepare.py or link to a system library only when that is explicitly desired.
  5. Write a thin C wrapper, private MoonBit externs, and safe public MoonBit wrappers.
  6. Validate with moon check, native tests, ASan, moon info, and vendoring script idempotency.

Binding Architecture

Installs
130
GitHub Stars
30
First Seen
Jun 2, 2026
make-moonbit-c-bindings — moonbitlang/skills