本文へスキップ
Kitbay
スキル

implementing-jsc-classes-rust

NOASSERTION2026年11月11日 更新96,758GitHubスター

A contributor guide in the Bun repository for adding a JavaScript class implemented in Rust, using Bun's bindings generator.

スキルの内容

A contributor guide in the Bun repository for adding a JavaScript class implemented in Rust, using Bun's bindings generator. The class is described in a .bind.ts schema (constructor arguments, methods, getters, internal fields), and the generator produces the JavaScriptCore cell, prototype, constructor and argument conversion that call into a matching Rust struct, so any mismatch fails at compile time. It explains when the struct should be reference-counted, which capabilities a method can request to allocate, throw or run JavaScript, why JavaScript values must never be kept in struct fields, and which files in the repository serve as worked examples. It is only useful when changing Bun's own source.

できること

ドキュメントに記載なし

implementing-jsc-classes-rust(Agent Skill) | Kitbay