Skip to content
Effect 4.0 is here. One ecosystem. Zero dependencies.

BunStream unstable

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 Since v4.0.0 Source

Constructors

Since v4.0.0

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>