An experimental port of NetBSD, FreeBSD, OpenBSD, and XNU to unkernel unkernel.dev
README.md

unkernel for Gleam #

The JavaScript target runs on Node 24 or newer. This example boots the bundled base shell, runs a guest command, and stops the kernel when the returned promise settles.

import unkernel

pub fn main() {
  unkernel.options()
  |> unkernel.with_memory(256)
  |> unkernel.with_kernel(fn(vm) { vm |> unkernel.exec("uname", ["-m"]) })
}

Run the smoke test from this directory.

npm install
gleam run -m example

To use these bindings in another Gleam project, add a local path dependency on this directory in its gleam.toml, set target = "javascript", and install the unkernel npm dependency from this directory's package.json in the consuming project. Use with_distro with a local image path to boot a distro.