本文へスキップ
Kitbay
スキル

implementing-jsc-classes-cpp

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

A contributor guide in the Bun repository for writing JavaScript classes backed by C++ on JavaScriptCore, the engine Bun uses.

スキルの内容

A contributor guide in the Bun repository for writing JavaScript classes backed by C++ on JavaScriptCore, the engine Bun uses. It explains which C++ classes a new JavaScript class needs (an object class, a prototype and, if public, a constructor), how to declare properties and methods in a static hash table, how to write getters, setters and functions with JavaScriptCore macros and type checks, where to register isolated memory subspaces, how to cache the class structure on Bun's global object so the garbage collector tracks it, and how to expose the class to Bun's Zig code. It is only useful when changing Bun's own source.

できること

ドキュメントに記載なし