bux-krun 0.1.3

Raw FFI bindings to libkrun — lightweight VM engine for sandboxed code execution
Documentation
  • Coverage
  • 100%
    56 out of 56 items documented0 out of 0 items with examples
  • Size
  • Source code size: 72.04 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.48 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 29s Average build duration of successful builds.
  • all releases: 29s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • qntx/bux
    3 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • gitctrlx

bux-krun

Raw FFI bindings to libkrun — a lightweight VM engine for sandboxed code execution.

Note: This crate provides unsafe, low-level bindings. Prefer the safe bux crate for application code.

How it works

Pre-generated bindgen bindings are committed in src/bindings.rs so end users do not need libclang installed. At build time the build script:

  1. Downloads the pre-built dynamic library from GitHub Releases (or uses BUX_DEPS_DIR).
  2. Configures the linker for dynamic linking and exports DEP_KRUN_LIB_DIR.

Regenerating bindings

To update bindings from the pinned qntx/libkrun fork header (requires libclang, Linux/macOS only):

make regenerate-bindings
# or manually:
BUX_UPDATE_BINDINGS=1 cargo check -p bux-krun --features regenerate

Environment variables

Variable Description
BUX_DEPS_DIR Path to a local directory containing pre-built libraries. Skips downloading.
BUX_DEPS_VERSION Override the deps release version (default: crate version).
BUX_UPDATE_BINDINGS Copy generated bindings back to src/bindings.rs (with regenerate feature).

Supported platforms

Target Backend
aarch64-apple-darwin Hypervisor.framework
x86_64-unknown-linux-gnu KVM
aarch64-unknown-linux-gnu KVM

License

Licensed under either of Apache License, Version 2.0 or MIT License at your option.