Implementation
Boxes are checked when the implementation is usable, if it’s not
complete but checked, should be in the skipped section along
with possibly the reason for skipping.
-
HTTP API’s
-
HTTP server
-
Bun.serve(),serve.fetch()and alike-
Servertype methods
-
-
WebSocket server
-
WebSocket event handlers (
message,open,close,drain) -
Pub/Sub functionality (
subscribe,publish,unsubscribe) -
Compression support (
perMessageDeflate) -
WebSocket client (
new WebSocket())
-
WebSocket event handlers (
-
-
HTTP client
-
Bun.fetch()
-
-
HTTP server
-
Bundler
-
Bun.build()(new bundler API)
-
-
Workers
- Worker constructors
- Worker posting & receiving messages
- Worker termination
-
Binary data
-
Types
-
ArrayBuffersupport -
TypedArrayvariants (Uint8Array, etc.) -
DataViewsupport -
Buffercompatibility -
Blobsupport -
BunFiletype (extendingBlob) with specific methods -
Filetype (extendingBlob)
-
-
Types
-
Streams
-
Stream types
-
ReadableStreamsupport -
WritableStreamsupport -
Direct
ReadableStream(optimized version) - Async generator streams support
-
-
Stream API’s
-
Bun.ArrayBufferSinkfor fast incremental buffer writing -
Stream conversion utilities (
Bun.readableStreamTo*methods)
-
-
Stream types
-
File I/O
-
Bunfiletype -
Reading (
Bun.file()…)-
Bun.file(),Bun.text(),Bun.json()… -
Bun.stdin -
Bun.stdout -
Bun.stderr
-
-
Writing (
Bun.write())
-
-
import.meta
-
import.meta.dir -
import.meta.path -
import.meta.url -
import.meta.main -
import.meta.resolve
-
-
SQL & Databases
-
SQLite
-
new() -
query() -
prepare() -
run() -
exec() -
get() -
all() -
iterate() -
values() -
finalise() -
close()
-
-
Redis client
- Connection methods
- Commands & operations
-
S3 Object Storage
-
Bun:s3client - Operations (get, put, list, etc.)
-
-
SQLite
-
FileSystemRouter
-
Next.js-style routing with
Bun.FileSystemRouter - Route matching with URLs and paths
-
Next.js-style routing with
-
Globals
-
$ Shell – if possible to implement
-
Child processes
-
Bun.spawn()-
Bun.spawn()withstdinoption. -
Bun.spawn()with IPC communication
-
-
Bun.spawnSync()-
Bun.spawnSync()withstdinoption.
-
-
-
TCP & Network
-
Bun.listen()(TCP server) -
Bun.connect()(TCP client) - UDP sockets
-
-
Transpiler
-
Bun.Transpilerfor code transformation
-
-
Hashing
-
Bun.password_hash()andBun.password_verify() -
Bun.hash() -
Bun.CryptoHasher
-
-
HTMLRewriter
- HTML transformation API
- Element handlers
-
Cookie
-
Bun.CookieMapfor parsing and manipulating cookies
-
-
FFI
- Foreign Function Interface for calling native code
- C Compiler integration
-
Testing
- Test runner utilities
- Assertion helpers
- Mock functionality
-
Glob
-
Bun.Globfor file pattern matching
-
-
Utilities
-
Bun.version -
Bun.revision -
Bun.env -
Bun.main -
Bun.sleep() -
Bun.sleepSync() -
Bun.which() -
Bun.randomUUIDv7() -
Bun.peek() -
Bun.openInEditor() -
Bun.deepEquals() -
Bun.escapeHTML() -
Bun.stringWidth() -
Bun.fileURLToPath() -
Bun.pathToFileURL() -
Bun.gzipSync() -
Bun.gunzipSync() -
Bun.deflateSync() -
Bun.inflateSync() -
Bun.inspect() -
Bun.nanoseconds() -
Bun.readableStreamTo*()methods for stream conversion -
Bun.resolveSync() -
serialize&deserializeinbun:jsc
-
-
DNS
- DNS resolver utilities
-
Semver
- Semantic versioning utilities
-
Color
- Terminal color utilities
Skipped
Some implementations were skipped for now. Here is a little list of what I skipped. If you want to help, feel free to implement them and make a PR, or wait until I get to them :)
- Utilities ->
Bun.gzipSync: Not sure how to implement this yet. - Utilities ->
Bun.gunzipSync: Not sure how to implement this yet. - Utilities ->
Bun.deflateSync: Not sure how to implement this yet. - Utilities ->
Bun.inflateSync: Not sure how to implement this yet. - Utilities ->
Bun.readableStreamTo*(): Not sure how to implement this. - Utilities ->
serialize&deserializeinbun:jsc: Not sure how to implement this yet. - DNS: Not stable enough yet.
import.meta: Gleam modules are not accessible from Bun API’s, maybe through source maps in the future.- Workers: Not stable enough yet.
- Color: Not implementing because there are enough other packages that implement terminal colors.
- Globals: Not relevant to the scope of this library. (Mostly contains browser-related globals. Some Bun ones, but those ought to be implemented elsewhere.)
- SQLite
Query.as(): I don’t think this would fit into the Gleam language.
Workarounds
No documented workarounds right now.