Fossil UI is a lightweight, cross-platform user interface library written in C, with optional C++ wrappers. It provides a consistent, deterministic UI abstraction layer for building interfaces across desktop, embedded, and constrained systems. Designed for performance, portability, and predictability, Fossil UI fits naturally into the broader Fossil ecosystem, including tooling, data systems, and embedded applications.
-
Cross-Platform & ABI-Stable
A consistent UI foundation across Windows, macOS, Linux, and embedded targets with a stable C ABI and optional C++ bindings. -
Unified UI Primitives
Core widgets and primitives such as windows, panels, buttons, text views, inputs, layouts, and drawable surfaces, designed for predictable rendering behavior. -
Declarative & Structured Composition
UI elements can be composed in a clear, hierarchical structure, enabling modular and reusable interface design. -
Event-Driven Interaction Model
Built around a deterministic event system for input handling, state changes, and UI updates with minimal overhead. -
Rendering Abstraction Layer
Backend-agnostic rendering interface supporting multiple targets (software rendering, GPU-accelerated backends, or embedded display systems). -
Runtime Introspection & Layout Control
Access and modify UI hierarchy, layout metrics, and component state at runtime for debugging and dynamic interfaces. -
Minimal State Overhead
Designed to reduce memory footprint and avoid hidden state, making it suitable for embedded and real-time systems. -
Zero External Dependencies
Fully portable C implementation with optional C++ wrappers and no required external runtime libraries.
To get started, ensure you have the following installed:
- Meson Build System: If you don’t have Meson
1.8.0or newer installed, follow the installation instructions on the official Meson website.
To add a git-wrap, place a .wrap file in subprojects with the Git repo URL and revision, then use dependency('fossil-ui') in meson.build so Meson can fetch and build it automatically.
Add the fossil-type.wrap file in your subprojects directory and include the following content:
[wrap-git]
url = https://github.com/fossillogic/fossil-ui.git
revision = v0.1.0
[provide]
dependency_names = fossil-uiNote: For the best experience, always use the latest releases. Visit the releases page for the latest versions.
Customize your build with the following Meson options: • Enable Tests To run the built-in test suite, configure Meson with:
meson setup builddir -Dwith_test=enabledThe project is designed so that test cases serve two purposes:
- ✅ Unit Tests – validate the framework’s correctness.
- 📖 Usage Samples – demonstrate how to use these libraries through test cases.
This approach keeps the codebase compact and avoids redundant “hello world” style examples.
Instead, the same code that proves correctness also teaches usage.
This mirrors the Meson build system itself, which tests its own functionality by using Meson to test Meson.
In the same way, Fossil Logic validates itself by demonstrating real-world usage in its own tests via Fossil Test.
meson test -C builddir -vRunning the test suite gives you both verification and practical examples you can learn from.
For those interested in contributing, reporting issues, or seeking support, please open an issue on the project repository or visit the Fossil Logic Docs for more information. Your feedback and contributions are always welcome.