Zum Inhalt springen
Kitbay
Skill

implementing-jsc-classes-cpp

NOASSERTIONAktualisiert am 11. Nov. 202696.758GitHub-Sterne

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

Was der Skill vermittelt

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.

Funktionen

In der Dokumentation nicht angegeben