implementing-jsc-classes-rust
Installation
SKILL.md
Contains Shell Commands
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
Bun's JavaScriptCore Class Bindings Generator
Bridge JavaScript and Rust through .classes.ts definitions and Rust implementations.
Architecture
- JavaScript Interface Definition (
.classes.tsfiles) - Rust Implementation (
.rsfiles) - Generated Code —
src/codegen/generate-classes.tsemits C++ + Rust into${BUN_CODEGEN_DIR}/generated_classes.rs,include!d ascrate::generated_classesinbun_runtime. Runbun bdto regenerate.