Skip to content

Commit a3fdfeb

Browse files
committed
Add more to this list
1 parent c024e73 commit a3fdfeb

1 file changed

Lines changed: 121 additions & 43 deletions

File tree

docs/runtime/bun-apis.md

Lines changed: 121 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,43 @@ Click the link in the right column to jump to the associated documentation.
1919

2020
---
2121

22-
- HTTP server
22+
- HTTP Server
2323
- [`Bun.serve`](https://bun.sh/docs/api/http#bun-serve)
2424

2525
---
2626

27+
- Shell
28+
- [`$`](https://bun.sh/docs/runtime/shell)
29+
30+
---
31+
2732
- Bundler
2833
- [`Bun.build`](https://bun.sh/docs/bundler)
2934

3035
---
3136

3237
- File I/O
33-
- [`Bun.file`](https://bun.sh/docs/api/file-io#reading-files-bun-file)
34-
[`Bun.write`](https://bun.sh/docs/api/file-io#writing-files-bun-write)
38+
- [`Bun.file`](https://bun.sh/docs/api/file-io#reading-files-bun-file), [`Bun.write`](https://bun.sh/docs/api/file-io#writing-files-bun-write), `Bun.stdin`, `Bun.stdout`, `Bun.stderr`
39+
40+
---
41+
42+
- Child Processes
43+
- [`Bun.spawn`](https://bun.sh/docs/api/spawn#spawn-a-process-bun-spawn), [`Bun.spawnSync`](https://bun.sh/docs/api/spawn#blocking-api-bun-spawnsync)
3544

3645
---
3746

38-
- Child processes
39-
- [`Bun.spawn`](https://bun.sh/docs/api/spawn#spawn-a-process-bun-spawn)
40-
[`Bun.spawnSync`](https://bun.sh/docs/api/spawn#blocking-api-bun-spawnsync)
47+
- TCP Sockets
48+
- [`Bun.listen`](https://bun.sh/docs/api/tcp#start-a-server-bun-listen), [`Bun.connect`](https://bun.sh/docs/api/tcp#start-a-server-bun-listen)
4149

4250
---
4351

44-
- TCP
45-
- [`Bun.listen`](https://bun.sh/docs/api/tcp#start-a-server-bun-listen)
46-
[`Bun.connect`](https://bun.sh/docs/api/tcp#start-a-server-bun-listen)
52+
- UDP Sockets
53+
- [`Bun.udpSocket`](https://bun.sh/docs/api/udp)
54+
55+
---
56+
57+
- WebSockets
58+
- `new WebSocket()` (client), [`Bun.serve`](https://bun.sh/docs/api/websockets) (server)
4759

4860
---
4961

@@ -57,44 +69,53 @@ Click the link in the right column to jump to the associated documentation.
5769

5870
---
5971

60-
- Streaming HTML Transformations
72+
- Streaming HTML
6173
- [`HTMLRewriter`](https://bun.sh/docs/api/html-rewriter)
6274

6375
---
6476

6577
- Hashing
66-
- [`Bun.hash`](https://bun.sh/docs/api/hashing#bun-hash)
67-
[`Bun.CryptoHasher`](https://bun.sh/docs/api/hashing#bun-cryptohasher)
78+
- [`Bun.password`](https://bun.sh/docs/api/hashing#bun-password), [`Bun.hash`](https://bun.sh/docs/api/hashing#bun-hash), [`Bun.CryptoHasher`](https://bun.sh/docs/api/hashing#bun-cryptohasher), `Bun.sha`
6879

6980
---
7081

71-
- import.meta
72-
- [`import.meta`](https://bun.sh/docs/api/import-meta)
82+
- SQLite
83+
- [`bun:sqlite`](https://bun.sh/docs/api/sqlite)
7384

7485
---
7586

76-
<!-- - [DNS](https://bun.sh/docs/api/dns)
77-
- `Bun.dns`
87+
- PostgreSQL Client
88+
- [`Bun.SQL`](https://bun.sh/docs/api/sql), `Bun.sql`
7889

79-
--- -->
90+
---
8091

81-
- SQLite
82-
- [`bun:sqlite`](https://bun.sh/docs/api/sqlite)
92+
- Redis (Valkey) Client
93+
- [`Bun.RedisClient`](https://bun.sh/docs/api/redis), `Bun.redis`
8394

8495
---
8596

86-
- FFI
97+
- FFI (Foreign Function Interface)
8798
- [`bun:ffi`](https://bun.sh/docs/api/ffi)
8899

89100
---
90101

102+
- DNS
103+
- [`Bun.dns.lookup`](https://bun.sh/docs/api/dns), `Bun.dns.prefetch`, `Bun.dns.getCacheStats`
104+
105+
---
106+
91107
- Testing
92108
- [`bun:test`](https://bun.sh/docs/cli/test)
93109

94110
---
95111

96-
- Node-API
97-
- [`Node-API`](https://bun.sh/docs/api/node-api)
112+
- Workers
113+
- [`new Worker()`](https://bun.sh/docs/api/workers)
114+
115+
---
116+
117+
- Module Loaders
118+
- [`Bun.plugin`](https://bun.sh/docs/bundler/plugins)
98119

99120
---
100121

@@ -103,27 +124,84 @@ Click the link in the right column to jump to the associated documentation.
103124

104125
---
105126

127+
- Cookies
128+
- [`Bun.Cookie`](https://bun.sh/docs/api/cookie), [`Bun.CookieMap`](https://bun.sh/docs/api/cookie)
129+
130+
---
131+
132+
- Node-API
133+
- [`Node-API`](https://bun.sh/docs/api/node-api)
134+
135+
---
136+
137+
- `import.meta`
138+
- [`import.meta`](https://bun.sh/docs/api/import-meta)
139+
140+
---
141+
106142
- Utilities
107-
- [`Bun.version`](https://bun.sh/docs/api/utils#bun-version)
108-
[`Bun.revision`](https://bun.sh/docs/api/utils#bun-revision)
109-
[`Bun.env`](https://bun.sh/docs/api/utils#bun-env)
110-
[`Bun.main`](https://bun.sh/docs/api/utils#bun-main)
111-
[`Bun.sleep()`](https://bun.sh/docs/api/utils#bun-sleep)
112-
[`Bun.sleepSync()`](https://bun.sh/docs/api/utils#bun-sleepsync)
113-
[`Bun.which()`](https://bun.sh/docs/api/utils#bun-which)
114-
[`Bun.peek()`](https://bun.sh/docs/api/utils#bun-peek)
115-
[`Bun.openInEditor()`](https://bun.sh/docs/api/utils#bun-openineditor)
116-
[`Bun.deepEquals()`](https://bun.sh/docs/api/utils#bun-deepequals)
117-
[`Bun.escapeHTML()`](https://bun.sh/docs/api/utils#bun-escapehtml)
118-
[`Bun.fileURLToPath()`](https://bun.sh/docs/api/utils#bun-fileurltopath)
119-
[`Bun.pathToFileURL()`](https://bun.sh/docs/api/utils#bun-pathtofileurl)
120-
[`Bun.gzipSync()`](https://bun.sh/docs/api/utils#bun-gzipsync)
121-
[`Bun.gunzipSync()`](https://bun.sh/docs/api/utils#bun-gunzipsync)
122-
[`Bun.deflateSync()`](https://bun.sh/docs/api/utils#bun-deflatesync)
123-
[`Bun.inflateSync()`](https://bun.sh/docs/api/utils#bun-inflatesync)
124-
[`Bun.inspect()`](https://bun.sh/docs/api/utils#bun-inspect)
125-
[`Bun.nanoseconds()`](https://bun.sh/docs/api/utils#bun-nanoseconds)
126-
[`Bun.readableStreamTo*()`](https://bun.sh/docs/api/utils#bun-readablestreamto)
127-
[`Bun.resolveSync()`](https://bun.sh/docs/api/utils#bun-resolvesync)
143+
- [`Bun.version`](https://bun.sh/docs/api/utils#bun-version), [`Bun.revision`](https://bun.sh/docs/api/utils#bun-revision), [`Bun.env`](https://bun.sh/docs/api/utils#bun-env), [`Bun.main`](https://bun.sh/docs/api/utils#bun-main)
144+
145+
---
146+
147+
- Sleep & Timing
148+
- [`Bun.sleep()`](https://bun.sh/docs/api/utils#bun-sleep), [`Bun.sleepSync()`](https://bun.sh/docs/api/utils#bun-sleepsync), [`Bun.nanoseconds()`](https://bun.sh/docs/api/utils#bun-nanoseconds)
149+
150+
---
151+
152+
- Random & UUID
153+
- [`Bun.randomUUIDv7()`](https://bun.sh/docs/api/utils#bun-randomuuidv7)
154+
155+
---
156+
157+
- System & Environment
158+
- [`Bun.which()`](https://bun.sh/docs/api/utils#bun-which)
159+
160+
---
161+
162+
- Comparison & Inspection
163+
- [`Bun.peek()`](https://bun.sh/docs/api/utils#bun-peek), [`Bun.deepEquals()`](https://bun.sh/docs/api/utils#bun-deepequals), `Bun.deepMatch`, [`Bun.inspect()`](https://bun.sh/docs/api/utils#bun-inspect)
164+
165+
---
166+
167+
- String & Text Processing
168+
- [`Bun.escapeHTML()`](https://bun.sh/docs/api/utils#bun-escapehtml), [`Bun.stringWidth()`](https://bun.sh/docs/api/utils#bun-stringwidth), `Bun.indexOfLine`
169+
170+
---
171+
172+
- URL & Path Utilities
173+
- [`Bun.fileURLToPath()`](https://bun.sh/docs/api/utils#bun-fileurltopath), [`Bun.pathToFileURL()`](https://bun.sh/docs/api/utils#bun-pathtofileurl)
174+
175+
---
176+
177+
- Compression
178+
- [`Bun.gzipSync()`](https://bun.sh/docs/api/utils#bun-gzipsync), [`Bun.gunzipSync()`](https://bun.sh/docs/api/utils#bun-gunzipsync), [`Bun.deflateSync()`](https://bun.sh/docs/api/utils#bun-deflatesync), [`Bun.inflateSync()`](https://bun.sh/docs/api/utils#bun-inflatesync), `Bun.zstdCompressSync()`, `Bun.zstdDecompressSync()`, `Bun.zstdCompress()`, `Bun.zstdDecompress()`
179+
180+
---
181+
182+
- Stream Processing
183+
- [`Bun.readableStreamTo*()`](https://bun.sh/docs/api/utils#bun-readablestreamto), `Bun.readableStreamToBytes()`, `Bun.readableStreamToBlob()`, `Bun.readableStreamToFormData()`, `Bun.readableStreamToJSON()`, `Bun.readableStreamToArray()`
184+
185+
---
186+
187+
- Memory & Buffer Management
188+
- `Bun.ArrayBufferSink`, `Bun.allocUnsafe`, `Bun.concatArrayBuffers`
189+
190+
---
191+
192+
- Module Resolution
193+
- [`Bun.resolveSync()`](https://bun.sh/docs/api/utils#bun-resolvesync)
194+
195+
---
196+
197+
- Parsing & Formatting
198+
- [`Bun.semver`](https://bun.sh/docs/api/semver), `Bun.TOML.parse`, [`Bun.color`](https://bun.sh/docs/api/color)
199+
200+
---
201+
202+
- Low-level / Internals
203+
- `Bun.mmap`, `Bun.gc`, `Bun.generateHeapSnapshot`, [`bun:jsc`](https://bun.sh/docs/api/bun-jsc)
204+
205+
---
128206

129207
{% /table %}

0 commit comments

Comments
 (0)