Skip to content

Repository files navigation

CrabEFI

A UEFI implementation written in Rust, designed as a reusable library with dependency injection for platform-specific hardware.

CrabEFI implements enough UEFI to boot Linux via shim/GRUB2 or systemd-boot on real hardware. It ships as a coreboot payload, a platform-agnostic boot library, and a separately linked Runtime Services image with bounded scratch allocation.

CrabEFI graphical boot menu

Graphical boot menu (--features ui), captured headlessly with ./crabefi screenshot --app hello --out screenshot.png. The command writes PPM directly or converts to PNG with ImageMagick; the referenced JPG was produced from that PNG with ImageMagick.

Documentation

See the docs/ directory:

Quick Start

# Enter nix development environment (provides QEMU, mtools, etc.)
nix develop

# Build the coreboot payload
./crabefi build

# Run integration tests
./crabefi test --app hello

# Run interactively in QEMU
./crabefi run --app hello

# Build for aarch64
./crabefi build --arch aarch64

Workspace Structure

Crate Description
crabefi-core Core library -- platform-agnostic UEFI implementation
crabefi-coreboot Coreboot payload binary (arch entry points, table parsing)
crabefi-drivers Standard hardware drivers (NVMe, AHCI, USB, SDHCI, SPI, serial)
crabefi-runtime-abi Pointer-free normalized image/handoff ABI
crabefi-runtime-image Separate EFI Runtime Services image with image-local bounded scratch allocation

External firmware implements boot-only platform traits, provides a normalized runtime image plus value-only runtime mechanisms in PlatformConfig, and calls crabefi::init_platform(). See docs/INTEGRATION.md for details.

License

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

About

A minimal UEFI implementation that's about enough to boot the OS (No DXE madness!!)

Resources

Stars

26 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages