Skip to content
Effect Days 2026 Get your ticket

BunStream

Bun stream interoperability for Effect streams.

This module is the Bun entry point for adapting runtime streams into Effect's streaming model. It re-exports the shared Node stream adapters for Bun's Node-compatible stream APIs and adds fromReadableStream, a Web ReadableStream adapter that uses Bun's readMany reader method to pull batches of values into an Effect Stream.

1 exports Added in v4.0.0 Source

Constructors

Creates a stream from a ReadableStream using Bun's optimized .readMany API.

Signature

declare function fromReadableStream<A, E>(options: {
readonly evaluate: LazyArg<ReadableStream<A>>;
readonly onError: (error: unknown) => E;
readonly releaseLockOnEnd?: boolean;
}): Stream<A, E>