Something went wrong. Try again.
An experimental port of NetBSD, FreeBSD, OpenBSD, and XNU to unkernel unkernel.dev
Something went wrong. Try again.
1234567891011121314// SPDX-License-Identifier: MIT// Copyright (C) 2026 unkernel contributorsimport { createKernel } from "unkernel/node";
export const options = {};export const withMemory = memoryMiB => opts => ({ ...opts, memoryMiB });export const withDistro = distro => opts => ({ ...opts, distro });export const bootImpl = opts => () => createKernel(opts);export const stopImpl = vm => async () => { await vm.stop(); };export const execImpl = exited => signaled => file => args => vm => async () => { const { stdout, stderr, exitCode, signal } = await vm.exec(file, args); return { stdout, stderr, termination: signal === null ? exited(exitCode) : signaled(signal) };};