Crate crun_sys

Crate crun_sys 

Source
Expand description

§crun-sys

Low-level Rust FFI bindings for libcrun, the OCI container runtime library.

This crate provides raw C bindings generated by bindgen. For a safe Rust interface, see the CrunEngine in the machineplane crate.

§Platform Support

libcrun is Linux-only (uses cgroups, namespaces, seccomp). On non-Linux platforms, this crate provides a stub module that compiles but provides no functionality.

§Requirements (Linux)

  • libcrun >= 1.8 installed on the system
  • libcrun development headers
  • Required dependencies: yajl, libseccomp, libcap

§Installation (Debian/Ubuntu)

apt-get install libcrun-dev libyajl-dev libseccomp-dev libcap-dev

§Installation (Fedora/RHEL)

dnf install crun-devel yajl-devel libseccomp-devel libcap-devel

§Safety

All functions in this crate are unsafe as they are direct C FFI bindings. The caller must ensure:

  • Pointers are valid and properly aligned
  • Strings are null-terminated
  • Contexts are properly initialized and freed
  • Thread safety is maintained (libcrun is not thread-safe per-context)

Re-exports§

pub use stub::*;

Modules§

stub
Stub module for non-Linux platforms.