Skip to main content

Crate libkrun_sys

Crate libkrun_sys 

Source
Expand description

Low-level FFI bindings to libkrun

This crate provides raw, unsafe bindings to the libkrun C library. For a safe, idiomatic Rust API, use the higher-level wrapper in the boxlite crate.

Constants§

KRUN_DISK_FORMAT_QCOW2
KRUN_DISK_FORMAT_RAW
KRUN_LOG_LEVEL_DEBUG
KRUN_LOG_LEVEL_ERROR
KRUN_LOG_LEVEL_INFO
KRUN_LOG_LEVEL_OFF
KRUN_LOG_LEVEL_TRACE
KRUN_LOG_LEVEL_WARN
KRUN_LOG_STYLE_ALWAYS
KRUN_LOG_STYLE_AUTO
KRUN_LOG_STYLE_NEVER
KRUN_LOG_TARGET_DEFAULT
KRUN_LOG_TARGET_STDERR
KRUN_LOG_TARGET_STDOUT

Functions§

krun_add_disk
krun_add_disk2
krun_add_net_unixgram
krun_add_net_unixstream
krun_add_virtiofs
krun_add_vsock_port2
krun_create_ctx
krun_free_ctx
krun_init_log
krun_set_console_output
Set a file path to redirect the console output to.
krun_set_env
krun_set_exec
krun_set_gpu_options
krun_set_kernel
krun_set_log_level
krun_set_nested_virt
krun_set_port_map
krun_set_rlimits
krun_set_root
krun_set_root_disk_remount
Configure a root filesystem backed by a block device with automatic remount.
krun_set_vm_config
krun_set_workdir
krun_setgid
Set the gid before starting the microVM.
krun_setuid
Set the uid before starting the microVM. This allows virtiofsd to run with CAP_SETUID for proper ownership handling.
krun_split_irqchip
krun_start_enter