一个 no_std 的 UEFI 后端,用于 Ratatui TUI 框架,使得无需操作系统即可直接在 EFI 应用中创建丰富的终端用户界面。

Stars

159

7 天增长

暂无数据

Fork 数

0

开放 Issue

0

开源协议

Apache-2.0

最近更新

2026-07-06

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它将流行的 Rust TUI 库 Ratatui 与 UEFI 环境桥接起来,让开发者能够使用熟悉的 Rust 生态系统为引导加载程序、恢复工具等预操作系统场景构建交互式键盘驱动的界面。

适合谁使用

  • 探索 UEFI 编程的 Rust 开发者
  • 引导加载程序或 EFI 应用的开发者
  • 需要预操作系统用户界面的系统程序员
  • 对无操作系统环境感兴趣的 TUI 爱好者

典型使用场景

  • 构建像 efimux 这样的自定义启动管理器
  • 创建在操作系统加载之前运行的诊断或恢复菜单
  • 开发带有文本界面的固件配置工具
  • 使用熟悉的 TUI 范式原型化简单的 UEFI 应用

项目优势

  • 利用成熟的 Ratatui 框架进行小部件布局和样式设置
  • 构建在维护良好的 uefi crate 之上,提供可靠的 UEFI 访问
  • 同时支持 QEMU 模拟和真实物理硬件
  • 号称“零膨胀”,意味着 UEFI 应用的额外开销极小

使用前须知

  • 需要在目标机器上禁用安全启动(Secure Boot)
  • 仅适用于 UEFI 环境(不支持 BIOS 或传统启动)
  • 设置过程涉及手动 USB 或 QEMU 配置步骤
  • 受限于 UEFI 固件提供的输入/输出能力

README 快速开始

Zero-bloat Ratatui in UEFI, no OS

What is it?

This library provides a (no_std) UEFI backend for Ratatui that is based on the uefi crate.

Together with uefi, you can create rich TUI's that run as EFI applications.

Examples

  • efimux is an EFI application for booting other EFI applications, built on ratatuefi.

Also check examples/.

Running in QEMU

  1. Install packages:

    pacman -S qemu-system-x86_64 edk2-ovmf
    

    (optionally, install some graphics backend (recommend sdl+opengl), but you can also VNC into the VM)

    pacman -S qemu-ui-sdl qemu-ui-opengl
    
  2. Create virtual EFI layout

    just create-virtual-uefi-layout
    

    then build and symlink the .efi in:
    (`` is something like ./target/x86_64-unknown-uefi/debug/.efi)

    ln -sf  esp/efi/boot/bootx64.efi
    
  3. Start QEMU

    just qemu
    

Running on a physical machine

from

Connect a USB drive. Follow steps below.

# Create the GPT, create a 9MB partition starting at 1MB, and set the
# partition type to EFI System.
sgdisk \
    --clear \
    --new=1:1M:10M \
    --typecode=1:C12A7328-F81F-11D2-BA4B-00A0C93EC93B \
    /path/to/disk

# Format the partition as FAT.
mkfs.fat /path/to/disk_partition

# Mount the partition.
mount --mkdir /path/to/disk_partition /mnt/ratatuefi

# Copy in the boot executable.
cp -rL esp/efi /mnt/ratatuefi/

# Eject the USB drive
eject /path/to/disk

[!IMPORTANT] disable secure boot on machine before trying to boot

Now try booting the USB drive!

项目描述

Zero-bloat Ratatui in UEFI, no OS

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

l0ng-ai
精选
l0ng-ai GitHub avatar

tty7

tty7 is a fast, GPU-accelerated terminal workbench with persistent sessions, built-in input tools, SSH support, and coding agent awareness.

开发者工具CLI 与终端
359
steelbrain
精选
steelbrain GitHub avatar

reims-vgpu

reims-vgpu is an experimental virtual GPU for macOS guests that uses QEMU to decode the guest's GPU command stream and execute it through Metal or Vulkan, leveraging the built-in AppleParavirtGPU driver without requiring custom kexts.

桌面应用
143
m-novotny
精选
m-novotny GitHub avatar

memguard-rs

A Rust library that provides secure memory handling primitives including zeroization on drop, memory locking, constant-time comparison, and compile-time guarded regions, with zero dependencies and no_std support.

嵌入式与物联网安全
131