Skip to content

BunWorkerRunner

Worker-entrypoint support for Bun worker runners.

This module exports a layer that provides WorkerRunnerPlatform for code already running inside a Bun Worker. The platform receives request messages from the parent-side BunWorker platform, runs the registered handler, sends responses through the worker postMessage channel, and closes when the parent sends the close message.

1 exports Added in v4.0.0 Source

Layers

layer

Added in v4.0.0 Source

Provides the WorkerRunnerPlatform for code running inside a Bun worker, routing parent messages to the registered handler and sending responses back through the worker port.

Signature

declare const layer: Layer.Layer<WorkerRunner.WorkerRunnerPlatform>;