aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-05-11 19:11:17 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2022-05-11 19:11:17 -0700
commit732124e3dd14528682f35fb47564f98d718aa980 (patch)
treeaa0df457b3b3d926b5fa8121f0c1ca28abbebe92
parenta15e66cc7beef3a38a9c2f9f5a36b36f199067d3 (diff)
downloadbun-732124e3dd14528682f35fb47564f98d718aa980.tar.gz
bun-732124e3dd14528682f35fb47564f98d718aa980.tar.zst
bun-732124e3dd14528682f35fb47564f98d718aa980.zip
Update README.md
-rw-r--r--README.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/README.md b/README.md
index 66cf5d930..4f850d6c6 100644
--- a/README.md
+++ b/README.md
@@ -62,6 +62,7 @@ If using Linux, kernel version 5.6 or higher is strongly recommended, but the mi
- [`Bun.serve`](#bunserve---fast-http-server)
- [`Bun.write`](#bunwrite--optimizing-io)
- [`bun:ffi` (Foreign functions interface)](#bunffi-foreign-functions-interface)
+ - [Node API (napi)](#node-api-napi)
- [`Bun.Transpiler`](#buntranspiler)
- [`transformSync`](#buntranspilertransformsync)
- [`transform`](#buntranspilertransform)
@@ -1914,11 +1915,11 @@ var mod = { exports: {} };
process.dlopen("./my-node-module.node", mod);
```
-As part of that work, Bun.js also polyfills the [`detect-libc`](npmjs.com/package/detect-libc) package, which is used by many Node-API modules to detect which `.node` binding to `require`.
+As part of that work, Bun.js also polyfills the [`detect-libc`](https://npmjs.com/package/detect-libc) package, which is used by many Node-API modules to detect which `.node` binding to `require`.
This implementation of Node-API is from scratch. It doesn't use any code from Node.js.
-Some implementation details:
+**Some implementation details**
When requiring a `*.node` module, Bun's JavaScript transpiler transforms the `require` expression into call to `import.meta.require`: