A modern GUI room for Ada.
Adi2 gives you a existent widget toolkit pinch the niceties developers expect from a modern UI stack — CSS-like styling pinch unrecorded reload, declarative XML layouts, animations, SVG and Lottie graphics, internationalization, and plus bundling — implemented natively successful Ada connected apical of SDL3.
Status: successful accumulation use, but not yet a unchangeable merchandise — APIs whitethorn still alteration betwixt versions.
- Style your UI for illustration the web. Selectors, pseudo-classes, parts, transitions, gradients, container shadows — each successful a acquainted .css syntax. Edit the file, save, spot the change. No recompile during development. Prefer axenic Ada? CSS rules are conscionable plain Ada aggregates of Style_Rules — constitute them by manus pinch nary other ceremonial (see the snippet below).
- Describe UIs declaratively — aliases don't. Write <button>, <grid>, <text-editor> successful XML and fto the toolchain emit cleanable Ada packages, or conception the aforesaid widget character straight successful Ada pinch handle-based builders. Both paths target the nonstop aforesaid API; the XML generator is simply a convenience, not a requirement.
- Render rich | content. A built-in lightweight HTML position widget renders documentation-style markup pinch cascading styles. Raster images done SDL3_image, SVG done the bundled plutosvg, Lottie animations done bundled rlottie.
- Ship a azygous binary. Bundle each CSS file, font, image, translation, and SVG sprite into your executable. No filesystem limitations astatine runtime.
- Speak the user's language. Gettext-compatible i18n pinch plural forms, automatic locale detection, and .po → Ada compilation.
- Animate without boilerplate. CSS transitions connected color, background-color, border-color, border-width, border-radius, padding, margin, opacity, box-shadow and font-size — the model handles interpolation and timing.
- HiDPI-ready units. dp/dip for layout, rem for typography, pix erstwhile you mean 1 renderer pixel exactly, and px — which follows the show standard aliases not, depending connected Set_Px_Maps_To_Dip. See docs/css_styling.md.
- Built for tooling and automation. A development-only MCP span lets editors and AI assistants screenshot the moving app, locomotion the widget tree, and thrust it — clicking buttons, typing into inputs, moving focus, reference capacity counters. Great for end-to-end tests written by your AI of choice.
- Runs successful the browser. The examples compile to WebAssembly pinch GNAT-LLVM and Emscripten — try them live, aliases spot wasm/ for the build.
A merchandise build links statically into a azygous executable nether 10 MB — the widget toolkit, the CSS engine, SVG and Lottie rendering, each of it. Whatever assets you bundle adhd their ain weight to that.
It draws done SDL's renderer, which binds to immoderate the big offers: Direct3D connected Windows, Metal connected macOS, Vulkan aliases OpenGL wherever they exist, software arsenic the floor. Windows XP takes Direct3D 9 and a existent Mac takes Metal, from the aforesaid source.
| Ship size | <10 MB, 1 file | ~15–30 MB static; different a Qt runtime alongside | ~20 MB+, motor positive a information directory | ~100 MB+, bundling Chromium and Node |
| Runtime | self-contained | Qt libraries and plugins | Flutter engine; GTK3 connected Linux | Chromium and Node |
| Graphics | SDL renderer, package fallback included | GPU aliases raster backends | Skia aliases Impeller, GPU expected | GPU stack and compositor |
| Portability | Windows XP+, macOS, Linux, WebAssembly | Windows 10+, macOS, Linux, mobile, embedded | Windows 10+, macOS, Linux, mobile, web | Windows 10+, macOS, Linux |
| Language | Ada | C++ | Dart | JavaScript |
| Memory safety | checked, deterministic reclamation | manual | garbage-collected | garbage-collected |
| Styling | CSS | QSS | Dart widget code | CSS |
Sizes are for a minimal application; yours grows pinch your ain codification and assets. Each of the others buys its size pinch a ample ecosystem and years of accumulation usage — the waste and acquisition Adi2 offers is simply a azygous record you tin manus to someone, connected hardware the others person moved past.
hello_example
material_demo
html_view_example
rlottie_example
assets_example
Full assemblage of each example: docs/gallery.md. Or tally them yourself, successful the browser: live demos.
Declarative way — XML + CSS
The toolchain emits a typed Ada package you instantiate from your main — spot examples/hello_example.adb for the afloat ~25-line program.
Same thing, written by manus successful Ada
The CSS norm supra is conscionable an aggregate. The XML widget character is conscionable a fewer constructor calls. Both paths onshore connected the aforesaid API — spot examples/hello_raw_example.adb for the afloat balanced program. The style of the styling codification is:
Build and tally either flavour:
To usage Adi2 from your ain project, pinch "adi.gpr" — SDL linker options travel pinch it. The library's nationalist specs usage Ada 2022 constructs, truthful units that pinch Adi.* packages request pragma Ada_2022; aliases -gnat2022.
Starting your ain project? docs/getting_started.md walks from an quiet directory to a moving window, successful XML/CSS and again successful plain Ada.
Full build instructions, including building without Alire, successful docs/build.md and docs/gprbuild_without_alire.md.
CSS.
- Broader CSS surface — much modular properties, selectors and values.
HTML view.
- Tables — table, tr, td/th, file widths, spanning.
- Flex and grid — display: flex and display: grid wrong the document.
Widgets and themes.
- More widgets — character view, information grid, paper bar, advancement and engaged indicators, tooltips, divided panes, day and colour pickers.
- Ready-made themes — Material, Fluent, Adwaita and macOS, each successful ray and dark.
Text and reach.
- Right-to-left and bidirectional text — guidance and bidi reordering.
- Accessibility — semantic roles, names and states to surface readers complete AT-SPI, UI Automation and NSAccessibility.
Portability.
- Pluggable backends — an abstraction furniture that lets Win32/Direct2D, Cocoa, GLFW, raylib aliases Skia return the spot of SDL3 (design notes).
- Embedded devices
Authoring and tooling.
- Visual designer — RAD IDE for illustration experience, edit some the UI XML and CSS.
- Scripting pinch HAC — embed the HAC Ada compiler for reloadable exertion logic.
- Live reload for XML UIs — XML widget trees hot-reload arsenic CSS already does.
- Better generated docs — browsable API archiving pinch gnatdoc.
Correctness and API.
- Better callbacks — a callback that fails leaves the app running, callbacks that occurrence once, and inheritance activity that talks to the UI safely (design notes).
- Contracts — Pre/Post/Type_Invariant and SPARK-mode subsets.
- C API — a unchangeable C-callable interface for non-Ada callers.
Have an idea? Open an rumor (see CONTRIBUTING.md for the policy).
Tested connected GNU/Linux, Windows (XP, 7, 8, 10, 11, via MinGW), macOS, and WebAssembly (Emscripten). Anywhere other GNAT and SDL3 build should travel — the BSDs among them.
Rendering goes done the SDL renderer abstraction, truthful it takes hardware acceleration wherever the instrumentality offers it and falls backmost to package wherever it does not. That is what puts the aforesaid binary connected Windows XP and connected a existent desktop.
Why "Adi2"? And why is the Ada package still Adi.*? "adi" is excessively communal a connection for hunt engines — Adi2 is findable. The in-code namespace stays Adi.* because pinch Adi.Widget.Button; sounds amended than Adi2.Widget.Button and renaming it would churn each root record for zero functional gain. Project = Adi2, package = Adi.
A Native, Portable GUI Framework for Ada — 3rd Ada Developers Workshop, AEiC 2026, 13 June 2026. Building an Adi2 application, and driving the moving UI from an LLM done the MCP bridge.
Part 1 · Part 2
Issues and propulsion requests welcome.
For thing beyond a mini fix, please unfastened an rumor first truthful the attack tin beryllium discussed earlier you put clip successful it. Match the existing codification style (docs/coding_conventions.md), support the tests green, and adhd tests for caller behaviour.
Unless you explicitly authorities otherwise, contributions you taxable are understood to beryllium nether the Apache-2.0 license, arsenic per its Section 5 — nary CLA to sign. Full specifications successful CONTRIBUTING.md.
Adi2 is independently developed and maintained. Sponsorship costs ongoing maintenance, cross-platform testing, documentation, and activity connected the nationalist roadmap.
Organisations willing successful supporting the project, aliases successful backing a circumstantial feature, port, aliases integration: [email protected].
Sponsorship supports the task arsenic a whole. Guaranteed consequence times aliases transportation commitments require a abstracted commercialized agreement.
Apache-2.0. See LICENSE.
Vendored third-party codification nether vendor/ retains its original licenses, listed successful each tree's ain licence files. Most are permissive — MIT, Apache-2.0, BSD-style, OFL. vendor/rlottie/src/vector/vinterpolator.cpp is MPL-2.0, a file-level copyleft alternatively than a permissive licence; its matter ships arsenic vendor/rlottie/licenses/COPYING.MPL.
Example assets nether examples/assets/ are objection contented alternatively than portion of the library; those pinch known third-party position are attributed successful examples/assets/NOTICE.md.
Adi2 is written by Aldo Nicolas Bruno. Report bugs and propose features done the rumor tracker. For backstage enquiries, sponsored development, aliases commercialized support: [email protected].
English (US) ·
Indonesian (ID) ·