Configs2026年7月14日·1 分钟阅读

GuiLite — Smallest Header-Only GUI Library for All Platforms

GuiLite is a tiny, header-only C++ GUI library at just 4,000 lines of code. It runs on embedded MCUs, desktop OSes, Docker, and even bare-metal displays with no dependencies.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
GuiLite GUI
直接安装命令
npx -y tokrepo@latest install 3c98958b-7f83-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

GuiLite is a header-only C++ GUI library compressed into roughly 4,000 lines of code. It targets extreme portability, running on microcontrollers, Linux framebuffers, Windows GDI, and Docker containers with no external dependencies.

What GuiLite Does

  • Provides basic widgets: buttons, labels, lists, keyboards, and wave displays
  • Renders directly to raw pixel buffers on any platform
  • Supports multi-layer compositing for overlapping UI elements
  • Works on MCUs with as little as 32KB RAM
  • Enables cross-platform development from embedded to desktop with one codebase

Architecture Overview

GuiLite operates on a simple display-surface-widget model. A display manages one or more surfaces (pixel buffers). Widgets draw themselves onto surfaces using direct pixel manipulation. There is no scene graph or layout engine; positions are set explicitly for maximum control and minimal overhead.

Self-Hosting & Configuration

  • Copy the single header file into your project; no build system changes needed
  • Implement a platform-specific display driver (framebuffer, GDI, or custom)
  • Set screen resolution and color depth at compile time
  • Example projects available for STM32, Raspberry Pi, and Windows
  • Use Docker samples to preview UI without hardware

Key Features

  • Entire library fits in one 4K-line header file
  • Zero external dependencies — no SDL, Qt, or OS-specific APIs required
  • Runs on ARM Cortex-M, RISC-V, x86, and MIPS architectures
  • Multi-language support through Unicode rendering
  • Animation and transition support for responsive UIs

Comparison with Similar Tools

  • LVGL — richer widget set and theme engine but larger footprint; GuiLite is smaller and simpler
  • Dear ImGui — immediate-mode paradigm for desktop tools; GuiLite targets embedded displays
  • Qt for MCUs — commercial solution with more features; GuiLite is free and dependency-free
  • Slint — modern declarative UI in Rust; GuiLite stays pure C++ header-only

FAQ

Q: How small is the compiled binary? A: A minimal GuiLite app compiles to under 10KB on ARM Cortex-M, depending on widget usage.

Q: Does GuiLite support touch input? A: Yes. It handles touch events and routes them to widgets; you provide the platform-specific touch driver.

Q: Can I use GuiLite for desktop applications? A: Yes. There are examples for Windows, Linux, and macOS using native display backends.

Q: Is GuiLite suitable for production embedded products? A: It is used in commercial IoT devices, medical instruments, and industrial panels where minimal resource usage matters.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产