diff options
author | 2022-06-22 23:21:48 -0700 | |
---|---|---|
committer | 2022-06-22 23:21:48 -0700 | |
commit | 729d445b6885f69dd2c6355f38707bd42851c791 (patch) | |
tree | f87a7c408929ea3f57bbb7ace380cf869da83c0e /src/javascript/jsc/builtins/README.md | |
parent | 25f820c6bf1d8ec6d444ef579cc036b8c0607b75 (diff) | |
download | bun-jarred/rename.tar.gz bun-jarred/rename.tar.zst bun-jarred/rename.zip |
change the directory structurejarred/rename
Diffstat (limited to 'src/javascript/jsc/builtins/README.md')
-rw-r--r-- | src/javascript/jsc/builtins/README.md | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/javascript/jsc/builtins/README.md b/src/javascript/jsc/builtins/README.md deleted file mode 100644 index 8ec32e8b5..000000000 --- a/src/javascript/jsc/builtins/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# JavaScript Builtins - -JavaScript files in [./js](./js) use JavaScriptCore's builtins syntax - -```js -@getter -function foo() { - return @getByIdDirectPrivate(this, "superSecret"); -} -``` - -It looks kind of like decorators but they're not. They let you directly call engine intrinsics and help with avoiding prototype pollution issues. - -V8 has a [similar feature](https://v8.dev/blog/embedded-builtins) (they use `%` instead of `@`) - -They usually are accompanied by a C++ file. - -The `js` directory is necessary for the bindings generator to work. - -To regenerate the builtins, run this from Bun's project root (where the `Makefile` is) - -```bash -make generate-builtins -``` - -You'll want to also rebuild all the C++ bindings or you will get strange crashes on start - -```bash -make clean-bindings -``` |