/ README.adoc
README.adoc
1 // SPDX-License-Identifier: AGPL-3.0-or-later 2 // SPDX-FileCopyrightText: 2025 Jonathan D.A. Jewell 3 = deno-bunbridge 4 :toc: macro 5 :icons: font 6 7 **Access Bun-specific APIs and ecosystem from Deno.** 8 9 image:https://img.shields.io/badge/license-AGPL--3.0-blue[License] 10 image:https://img.shields.io/badge/deno-runtime-green[Deno] 11 image:https://img.shields.io/badge/bun-ecosystem-orange[Bun Ecosystem] 12 13 toc::[] 14 15 == Overview 16 17 deno-bunbridge provides Deno implementations of Bun-specific APIs, allowing code written for Bun to run on Deno, and giving Deno users access to Bun ecosystem patterns. 18 19 == What This Bridges 20 21 [cols="1,1,1"] 22 |=== 23 | Bun API | deno-bunbridge Equivalent | Implementation 24 25 | `bun:sqlite` | `bunbridge/sqlite` | FFI to libsqlite3 or better-sqlite3 26 | `Bun.serve()` | `bunbridge/serve` | Wraps `Deno.serve()` 27 | `Bun.file()` | `bunbridge/file` | Wraps Deno file APIs 28 | `Bun.spawn()` | `bunbridge/spawn` | Wraps `Deno.Command` 29 | `Bun.write()` | `bunbridge/write` | Wraps `Deno.writeFile` 30 | Bun's Zig FFI | `bunbridge/ffi` | Maps to `Deno.dlopen` 31 |=== 32 33 == Installation 34 35 [source,typescript] 36 ---- 37 import { Database } from "jsr:@hyperpolymath/deno-bunbridge/sqlite"; 38 import { serve } from "jsr:@hyperpolymath/deno-bunbridge/serve"; 39 ---- 40 41 == Quick Start 42 43 [source,typescript] 44 ---- 45 // Code that looks like Bun, runs on Deno 46 import { Database } from "deno-bunbridge/sqlite"; 47 48 const db = new Database(":memory:"); 49 db.run("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)"); 50 db.run("INSERT INTO users (name) VALUES (?)", ["Alice"]); 51 52 const users = db.query("SELECT * FROM users").all(); 53 console.log(users); 54 ---- 55 56 == Roadmap 57 58 * **v0.1** — SQLite bridge (`bun:sqlite` API on Deno) 59 * **v0.2** — File and serve bridges 60 * **v0.3** — FFI compatibility layer 61 * **v1.0** — Full Bun API coverage 62 63 == Related Projects 64 65 * https://github.com/hyperpolymath/bundeno[bundeno] — Runtime portability layer 66 * https://github.com/hyperpolymath/beamdeno[beamdeno] — BEAM connectivity 67 * https://github.com/hyperpolymath/v-deno[v-deno] — V language FFI 68 69 == License 70 71 AGPL-3.0-or-later