Skip to content

createBunAdapter

Generated reference page for the createBunAdapter function export.

Signatures

ts
function createBunAdapter(proc?: NodeProcess): RuntimeAdapter;
ParameterTypeDescription
procNodeProcess | undefinedOverride the process object (useful for testing the adapter itself).

Members

Members

createBunAdapter

Create a runtime adapter backed by Bun's Node-compatible process global.

Bun exposes globalThis.process with the same shape as Node.js, so this delegates entirely to createNodeAdapter. If Bun-specific optimizations are needed in the future (e.g. Bun.write for I/O), they can be layered here without changing the public API.

ts
(proc?: NodeProcess): RuntimeAdapter;

Examples

ts
import { cli } from '@kjanat/dreamcli';
import { createBunAdapter } from '@kjanat/dreamcli/runtime';

cli('mycli')
  .command(deploy)
  .run({ adapter: createBunAdapter() });

See Also

Released under the MIT License.