bsdkrun/system

Host-level toolchain and image operations.

Types

Which BSD an image operation targets.

pub type Bsd {
  Freebsd
  Netbsd
}

Constructors

  • Freebsd
  • Netbsd

Values

pub fn fetch_image(
  os: Bsd,
  version: option.Option(String),
  dir: option.Option(String),
  force: Bool,
) -> Result(String, error.Error)

Download and prepare a BSD image ahead of time, returning the CLI’s output.

pub fn grow_disk(
  disk: String,
  size: String,
) -> Result(Nil, error.Error)

Grow a raw disk image. The guest expands its root filesystem on next boot.

pub fn probe() -> Bool

Sanity-check the toolchain: verify libkrun links and that a context can be created and configured. Does not boot anything.

pub fn versions(os: Bsd) -> Result(List(String), error.Error)

The builds available to fetch for a BSD — the CLI’s non-empty output lines.

Search Document