{"id":24750755,"url":"https://github.com/siguici/beno","last_synced_at":"2026-02-15T15:06:56.578Z","repository":{"id":253169274,"uuid":"842349833","full_name":"siguici/beno","owner":"siguici","description":"⚙️ Cross-Platform JavaScript/TypeScript Runtime Adapter.","archived":false,"fork":false,"pushed_at":"2025-03-11T19:19:33.000Z","size":383,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"trunk","last_synced_at":"2025-06-28T07:50:44.243Z","etag":null,"topics":["adapter","beno","bun","bun-sh","compatibility","cross-platform","cross-runtime","deno","denoland","javascript","node-js","nodejs","runtime","typescript","wrapper"],"latest_commit_sha":null,"homepage":"https://npm.im/beno","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siguici.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-14T07:06:47.000Z","updated_at":"2025-03-11T19:19:37.000Z","dependencies_parsed_at":"2024-09-24T15:30:33.887Z","dependency_job_id":"ab48240a-3e84-4898-89b6-b640b5340cc4","html_url":"https://github.com/siguici/beno","commit_stats":{"total_commits":69,"total_committers":1,"mean_commits":69.0,"dds":0.0,"last_synced_commit":"e2a0625ad440ed0f285e9e53633a7129ebf8075e"},"previous_names":["siguici/buno","siguici/beno"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/siguici/beno","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siguici%2Fbeno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siguici%2Fbeno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siguici%2Fbeno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siguici%2Fbeno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siguici","download_url":"https://codeload.github.com/siguici/beno/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siguici%2Fbeno/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267096185,"owners_count":24035318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adapter","beno","bun","bun-sh","compatibility","cross-platform","cross-runtime","deno","denoland","javascript","node-js","nodejs","runtime","typescript","wrapper"],"created_at":"2025-01-28T09:08:51.682Z","updated_at":"2026-02-15T15:06:56.546Z","avatar_url":"https://github.com/siguici.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Beno ⚙️\n\n**Beno** is a cross-platform runtime adapter for JavaScript and TypeScript,\ndesigned to unify API access across Node.js, Bun, and Deno environments.\nIt allows developers to write portable code with consistent APIs,\noptimizing performance and compatibility for each runtime.\n\n## ✨ Features\n\n- **Cross-Platform Compatibility**: Works seamlessly across Node.js, Bun, and Deno.\n- **Unified API**: Provides a consistent interface for accessing common modules\n  like `fs`, `path`, etc.\n- **Runtime Detection**: Automatically detects the runtime environment\n  and loads the appropriate implementation.\n- **Optimized Performance**: Adapts to each runtime's specific features\n  for optimal performance.\n\n## 📋 Requirements\n\nBeno only supports at least one of the following runtimes:\n\n- [Node.js@^20.16.0](https://nodejs.org/)\n- [Bun@^1.1.24](https://bun.sh/)\n- [Deno@^1.45.5](https://deno.com/)\n\n## 🚀 Installation\n\nYou can install [`Beno`](https://github.com/siguici/beno)\nfrom [`NPM`](https://npmjs.com/package/beno) or [`JSR`](https://jsr.io/@siguici/beno):\n\n- Using `npm`:\n\n  From [`NPM`](https://npmjs.com/package/beno):\n\n  ```bash\n  npm install beno\n  ```\n\n  From [`JSR`](https://jsr.io/@siguici/beno):\n\n  ```bash\n  npx jsr add @siguici/beno\n  ```\n\n- Using `Yarn`:\n\n  From [`NPM`](https://npmjs.com/package/beno):\n\n  ```bash\n  yarn add beno\n  ```\n\n  From [`JSR`](https://jsr.io/@siguici/beno):\n\n  ```bash\n  yarn dlx jsr add @siguici/beno\n  ```\n\n- Using `PNPM`:\n\n  From [`NPM`](https://npmjs.com/package/beno):\n\n  ```bash\n  pnpm add beno\n  ```\n\n  From [`JSR`](https://jsr.io/@siguici/beno):\n\n  ```bash\n  pnpm dlx jsr add @siguici/beno\n  ```\n\n- Using `Bun`:\n\n  From [`NPM`](https://npmjs.com/package/beno):\n\n  ```bash\n  bun install beno\n  ```\n\n  From [`JSR`](https://jsr.io/@siguici/beno):\n\n  ```bash\n  bunx jsr add @siguici/beno\n  ```\n\n- Using `Deno`:\n\n  From [`NPM`](https://npmjs.com/package/beno):\n\n  ```bash\n  deno install npm:beno\n  ```\n\n  From [`JSR`](https://jsr.io/@siguici/beno):\n\n  ```bash\n  deno add @siguici/beno\n  ```\n\n  Without install:\n\n  ```typescript\n  import beno from 'jsr:@siguici/beno';\n  ```\n\n## 💡 Usage\n\n- Import from `NPM`:\n\n  ```javascript\n  import { fs, path } from 'beno';\n  ```\n\n- Import from `JSR`:\n\n  ```javascript\n  import { fs, path } from '@siguici/beno';\n  ```\n\n- Import without install (using `Deno`):\n\n  ```javascript\n  import { fs, path } from 'jsr:@siguici/beno';\n  ```\n\n- Use modules imported from `Beno`:\n\n  ```typescript\n  // Example usage of fs\n  fs.readFile('example.txt', 'utf8', (err, data) =\u003e {\n    if (err) throw err;\n    console.log(data);\n  });\n\n  // Example usage of path\n  const fullPath = path.resolve('example.txt');\n  console.log(fullPath);\n  ```\n\n## ⚙️ Node.js API Compatibility\n\nBeno aims to unify and simplify cross-runtime development\nby providing a consistent interface for [Node.js APIs](https://nodejs.org/api/)\nacross [Deno](https://deno.com/) and [Bun](https://bun.sh/).\nWhile Beno strives for complete Node.js API compatibility,\nsome modules may have partial or no implementation in specific runtimes.\nMost [npm packages](https://www.npmjs.com/) intended for `Node.js` environments\nwill work seamlessly with Beno, but the best way to ensure compatibility is\nto test them directly.\n\nThis document is regularly updated to reflect the compatibility status\nof the latest versions of `Deno` and `Bun`.\nThe information below reflects Beno's compatibility with _Node.js v20 APIs_\nas implemented in both `Deno` and `Bun`. If you encounter any compatibility issues,\nplease [open an issue on GitHub](https://github.com/siguici/beno/issues/new/choose).\nReporting such issues helps us prioritize and address gaps in compatibility.\n\n- ✅ = Implemented in both\n- ⚠️ = Partial support\n- ❌ = Not implemented in either\n\n- 🟢 = Fully implemented\n- 🟡 = Partially implemented\n- 🔴 = Not implemented\n\n### 📦 Built-in Module Support\n\n- ✅ **node:assert**\n  - 🟢 Fully implemented in both.\n\n- ⚠️ **node:async_hooks**\n  - 🟡 Only `AsyncLocalStorage`, and `AsyncResource` are implemented.\n    `AsyncResource` is missing bind in Bun.\n  - 🟡 `AsyncLocalStorage` is supported. `AsyncResource`, `executionAsyncId`,\n    and `createHook` are non-functional stubs in Deno.\n\n- ✅ **node:buffer**\n  - 🟢 Fully implemented in both.\n\n- ⚠️ **node:child_process**\n  - 🟡 Missing `proc.gid`, `proc.uid`. Stream class not exported.\n    IPC cannot send socket handles in Bun.\n  - 🟢 Fully implemented in Deno\n\n- ❌ **node:cluster**\n  - 🔴 Not implemented in both.\n\n- ✅ **node:console**\n  - 🟢 Fully implemented in both.\n\n- ⚠️ **node:crypto**\n  - 🟡 Missing various methods including `Certificate`, `ECDH`, `X509Certificate`,\n    etc. Some methods are not optimized in Bun.\n  - 🟡 Missing `Certificate class`, `crypto.Cipheriv.prototype.setAutoPadding`,\n    `crypto.Decipheriv.prototype.setAutoPadding`, `crypto.publicDecrypt`,\n    `crypto.ECDH.prototype.convertKey`, `x448` option for `generateKeyPair`,\n    `crypto.KeyObject`, and other methods in Deno.\n\n- ⚠️ **node:dgram**\n  - 🟡 Missing several methods such as `setBroadcast`, `setTTL`, `setMulticastTTL`,\n    etc., in Bun.\n  - 🟡 Some methods are non-functional stubs in Deno.\n\n- ✅ **node:diagnostics_channel**\n  - 🟢 Fully implemented in both.\n\n- ⚠️ **node:dns**\n  - 🟡 Missing `cancel`, `setServers`, `getDefaultResultOrder` in Bun.\n  - 🟡 Missing `dns.resolve*` with `ttl` option in Deno.\n\n- ⚠️ **node:domain**\n  - 🔴 All exports are non-functional stubs in both\n\n- ⚠️ **node:events**\n  - 🟡 `events.addAbortListener` \u0026 `events.getMaxListeners`\n    do not support (web api) `EventTarget` in Bun.\n  - 🟢 Fully implemented in Deno\n\n- ⚠️ **node:fs**\n  - 🟡 Missing `statfs`, `statfsSync`, `opendirSync`.\n    Dir is partially implemented in Bun.\n  - 🟡 Missing `utf16le`, `latin1`, and `ucs2` encoding for `fs.writeFile` and `fs.writeFileSync`.\n    `lchmod` is missing in `fs/promises` in Deno.\n\n- ✅ **node:http**\n  - 🟢 Fully implemented in both.\n    Outgoing client request body is currently buffered instead of streamed in Bun.\n\n- ⚠️ **node:http2**\n  - 🟡 Client is supported, but server isn't yet in Bun.\n  - 🟡 Partially supported, major work in progress to enable `grpc-js` in Deno.\n\n- ⚠️ **node:https**\n  - 🟡 APIs are implemented, but Agent is not always used yet in Bun.\n  - 🟡 `Missing https.Server.opts.cert` and `https.Server.opts.key` array type in Deno.\n\n- ❌ **node:inspector**\n  - 🔴 Not implemented in both.\n\n- ⚠️ **node:module**\n  - 🟡 Missing `runMain`, `syncBuiltinESMExports`, `Module#load()`.\n    Attempts to override or patch the module cache will fail in Bun.\n  - 🟡 The `register()` function is not supported in Deno.\n\n- ⚠️ **node:net**\n  - 🟡 Missing `SocketAddress` `Stream`, `BlockList` is a no-op in Bun.\n  - 🟡 Missing `net.Socket.prototype.constructor` with `fd` option in Deno.\n\n- ✅ **node:os**\n  - 🟢 Fully implemented in both.\n\n- ✅ **node:path**\n  - 🟢 Fully implemented in both.\n\n- ⚠️ **node:perf_hooks**\n  - 🟡 Missing `createHistogram`, `monitorEventLoopDelay` in Bun.\n  - 🟡 Missing `perf_hooks.eventLoopUtilization`, `perf_hooks.timerify`,\n    `perf_hooks.monitorEventLoopDelay` in Deno.\n\n- ⚠️ **node:process**\n  - 🟡 See `process` Global in Bun.\n  - 🟡 Missing `multipleResolves`, `worker` events in Deno.\n\n- ✅ **node:punycode**\n  - 🟢 Fully implemented in both.\n\n- ✅ **node:querystring**\n  - 🟢 Fully implemented in both.\n\n- ✅ **node:readline**\n  - 🟢 Fully implemented in both.\n\n- ❌ **node:repl**\n  - 🔴 Not implemented in Bun.\n  - 🟡 `builtinModules` and `_builtinLibs` are supported.\n    Missing `REPLServer.prototype.constructor` and `start()` in Deno.\n\n- ⚠️ **node:stream**\n  - 🟡 Missing `getDefaultHighWaterMark`, `setDefaultHighWaterMark`, `toWeb` in Bun.\n  - 🟢 Fully implemented in Deno.\n\n- ✅ **node:string_decoder**\n  - 🟢 Fully implemented in both.\n\n- ✅ **node:sys**\n  - 🟢 Fully implemented in both.\n\n- ❌ **node:test**\n  - 🔴 Not implemented in Bun. Use `bun:test` instead.\n  - 🟡 Currently only test API is supported in Deno.\n\n- ✅ **node:timers**\n  - 🟢 Fully implemented in both.\n\n- ⚠️ **node:tls**\n  - 🟡 Missing `createSecurePair` in both.\n\n- ❌ **node:trace_events**\n  - 🔴 Not implemented in both.\n\n- ✅ **node:tty**\n  - 🟢 Fully implemented in both.\n\n- ⚠️ **node:util**\n  - 🟡 Missing `MIMEParams`, `MIMEType`, `aborted`, `debug`, `getSystemErrorMap`,\n    `transferableAbortController`, `transferableAbortSignal` in Bun.\n  - 🟡 Missing `aborted`, `transferableAbortSignal`, `transferableAbortController`,\n    `MIMEParams`, `MIMEType` and `getSystemErrorMap` in Deno.\n\n- ✅ **node:url**\n  - 🟢 Fully implemented in both.\n\n- ❌ **node:v8**\n  - 🟡 `serialize` and `deserialize` use JavaScriptCore's wire format\n    instead of V8's. Otherwise, not implemented in Bun.\n  - 🟡 `cachedDataVersionTag` and `getHeapStatistics` are supported. `setFlagsFromStrings`\n    is a noop. Other APIs are not supported and will throw an error in Deno.\n\n- ⚠️ **node:vm**\n  - 🟡 Core functionality works,\n    but experimental VM ES modules are not implemented in Bun.\n  - 🟡 Partial support in Deno\n\n- ❌ **node:wasi**\n  - 🔴 Not implemented in both.\n\n- ⚠️ **node:worker_threads**\n  - 🟡 Worker doesn't support the following options in Bun:\n    `stdin`, `stdout`, `stderr`, `trackedUnmanagedFds`, `resourceLimits`.\n    Missing `markAsUntransferable`, `moveMessagePortToContext`,\n    `getHeapSnapshot` in Bun.\n  - 🟡 Missing `parentPort.emit`, `parentPort.removeAllListeners`,\n    `markAsUntransferable`, `moveMessagePortToContext`, `receiveMessageOnPort`,\n    `Worker.prototype.getHeapSnapshot` in Deno.\n\n- ⚠️ **node:zlib**\n  - 🟡 Unoptimized in Bun.\n  - 🟢 Fully implemented in Deno.\n\n### 🌐 Globals support\n\n- ✅ **`AbortController`**\n\n- ✅ **`AbortSignal`**\n\n- ✅ **`Blob`**\n\n- ✅ **`Buffer`**\n\n- ✅ **`ByteLengthQueuingStrategy`**\n\n- ⚠️ **`__dirname`**\n  - 🟢 Fully supported in Bun\n  - 🔴 Not implemented in Deno\n\n- ⚠️ **`__filename`**\n  - 🟢 Fully supported in Bun\n  - 🔴 Not implemented in Deno\n\n- ✅ **`atob()`**\n\n- ✅ **`BroadcastChannel`**\n\n- ✅ **`btoa()`**\n\n- ✅ **`clearImmediate()`**\n\n- ✅ **`clearInterval()`**\n\n- ✅ **`clearTimeout()`**\n\n- ❌ **`CompressionStream`**\n  - 🟢 Not implemented in Bun\n  - 🔴 Fully supported in Deno\n\n- ✅ **`console`**\n\n- ✅ **`CountQueuingStrategy`**\n\n- ✅ **`Crypto`**\n\n- ✅ **`SubtleCrypto` (crypto)**\n\n- ✅ **`CryptoKey`**\n\n- ✅ **`CustomEvent`**\n\n- ❌ **`DecompressionStream`**\n  - 🔴 Not implemented in Bun\n  - 🟢 Fully supported in Deno\n\n- ✅ **`Event`**\n\n- ✅ **`EventTarget`**\n\n- ✅ **`exports`**\n\n- ✅ **`fetch`**\n\n- ✅ **`FormData`**\n\n- ✅ **`global`**\n  - 🟡 Fully supported in both (Note: In Bun, `globalThis` aliases to `global`.)\n\n- ✅ **`globalThis`**\n\n- ✅ **`Headers`**\n\n- ✅ **`MessageChannel`**\n\n- ✅ **`MessageEvent`**\n\n- ✅ **`MessagePort`**\n\n- ✅ **`module`**\n\n- ✅ **`PerformanceEntry`**\n\n- ✅ **`PerformanceMark`**\n\n- ✅ **`PerformanceMeasure`**\n\n- ✅ **`PerformanceObserver`**\n\n- 🔴 **`PerformanceObserverEntryList`**\n  - 🟢 Fully supported in Bun\n  - 🔴 Not implemented in Deno\n\n- ❌ **`PerformanceResourceTiming`**\n\n- ✅ **`performance`**\n\n- ⚠️ **`process`**\n  - 🟡 Partial support in Bun (Missing several methods and features)\n  - 🟢 Fully supported in Deno\n\n- ✅ **`queueMicrotask()`**\n\n- ✅ **`ReadableByteStreamController`**\n\n- ✅ **`ReadableStream`**\n\n- ✅ **`ReadableStreamBYOBReader`**\n\n- ✅ **`ReadableStreamBYOBRequest`**\n\n- ✅ **`ReadableStreamDefaultController`**\n\n- ✅ **`ReadableStreamDefaultReader`**\n\n- ✅ **`require()`**\n  - 🟢 Fully supported in Bun (including `require.main`, `require.cache`, `require.resolve`)\n  - 🟢 Fully supported in Deno\n\n- ✅ **`Response`**\n\n- ✅ **`Request`**\n\n- ✅ **`setImmediate()`**\n\n- ✅ **`setInterval()`**\n\n- ✅ **`setTimeout()`**\n\n- ✅ **`structuredClone()`**\n\n- ✅ **`DOMException`**\n\n- ✅ **`TextDecoder`**\n\n- ✅ **`TextDecoderStream`**\n\n- ✅ **`TextEncoder`**\n\n- ✅ **`TextEncoderStream`**\n\n- ✅ **`TransformStream`**\n\n- ✅ **`TransformStreamDefaultController`**\n\n- ✅ **`URL`**\n\n- ✅ **`URLSearchParams`**\n\n- ✅ **`WebAssembly`**\n\n- ✅ **`WritableStream`**\n\n- ✅ **`WritableStreamDefaultController`**\n\n- ✅ **`WritableStreamDefaultWriter`**\n\n## 🤝Contributing\n\nContributions are welcome! If you have suggestions or improvements,\nplease open an issue or submit a pull request on GitHub.\n\n## 📜 License\n\nThis project is licensed under the MIT License -\nsee the [LICENSE.md file](./LICENSE.md) for details.\n\n## 🔗 Contact\n\nFor questions or feedback, you can reach out to [siguici@proton.me](mailto:siguici@proton.me).\n\n---\n\n**Beno** aims to make cross-runtime development easier and more efficient.\nWe hope you find it useful! 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiguici%2Fbeno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiguici%2Fbeno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiguici%2Fbeno/lists"}