Cool project. Good idea to use SDL3; it brings along much more than SDL2 where you had to use a lot of other libraries to become platform independent with all features. The disadvantage might be that SDL3 itself (as SLD2) is pretty big. Ada got a bit out of fashion (unfortunately) but it's still an impressive, excellent language. Still an interesting choice. Maybe you can give more information about your choice and plans with the GUI library.
Hi! Interesting! Your frameworks seems to be a kind of web browser, with dynamic content. Adi2 takes a different approach. Your entire app is static code. Every widget, every style is built at compile time. No interpreters or parsers at runtime.
--
Why Ada, well and why Rust? I guess it depends on your taste...
It is a language with a long history, completely defined both the language and it's runtime library, it is an ISO standard, it is readable, it is modern, it has many features both for embedded and general purpose use, it has 1st class support on GCC as a frontend. Maybe it does not have a borrow checker as of today, but if you need to harden you can use the Ada/SPARK subset, a very interesting language, that can prove program correctness at compile time.
> Every widget, every style is built at compile time.
Huh. That does sound cool. Does that mean that the XML and CSS is parsed and resolved at compile time? How does that handle dynamic content changes (e.g. content changes in response to user input).
Note that while Blitz applies CSS and runs layout at runtime, the scripting layer (equivalent of JS in the browser or Dart in flutter) is AOT-compiled Rust.
The XML is just a layer, it gets compiled to normal code that creates / operates on the widget tree. On any user input callbacks are just Ada code that can again apply changes to widgets, like states, or add / remove widgets or set properties like label text etc. The CSS is also converted to Ada constants that are used by the styling engine at runtime. You can check the getting started, it shows how it is done both as pure Ada or as XML/CSS.
GNAT (not Ada) has an implementation restriction that you cannot have multiple compilation-units in a single file; I believe that the dot-replacement is a holdover from when GNAT/GCC was dealing with DOS.
I agree on the repetitions those need cleanup. Regarding filenames, it is a GNAT convention (the GCC's ada compiler) where we need to have the package name on it separated by -
Author here, the library itself is pure Ada, the XML UI is just a convenience layer on top of it, there is a code generator that picks it and writes ada packages. happy to hear better alternatives!
I'd recommend ASN.1 for almost everything that XML is used for.
Unfortunately, is a [semi-] human-readable file is in your list of 'needs', then that is "mostly" ruled out.
(So, what you could do is use the XML-encoding of ASN.1, and then use _that_ in the place of your (current) XML, and then simply allow eg DER encoded objects.)
Cool project. Good idea to use SDL3; it brings along much more than SDL2 where you had to use a lot of other libraries to become platform independent with all features. The disadvantage might be that SDL3 itself (as SLD2) is pretty big. Ada got a bit out of fashion (unfortunately) but it's still an impressive, excellent language. Still an interesting choice. Maybe you can give more information about your choice and plans with the GUI library.
I'm going to ask the obvious question: why ADA?
---
My framework (Dioxus Native - https://github.com/dioxuslabs/blitz) would fit quite nicely into your comparison table:
- Compiles to self-contained OS-native app bundle
- <10 MB (compiled with Oz) or ~15MB (with O3) (can be golfed smaller)
- GPU or CPU rendering
- Windows 10+ / macOS / Linux / mobile / wasm / (+ web DOM with Dioxus Web)
- Rust
- Memory safety: borrow checked
- Styling: CSS (support matrix: https://blitz.is/status/css)
Hi! Interesting! Your frameworks seems to be a kind of web browser, with dynamic content. Adi2 takes a different approach. Your entire app is static code. Every widget, every style is built at compile time. No interpreters or parsers at runtime.
-- Why Ada, well and why Rust? I guess it depends on your taste...
You can know more about Ada here: https://learn.adacore.com/courses/intro-to-ada/chapters/intr...
It is a language with a long history, completely defined both the language and it's runtime library, it is an ISO standard, it is readable, it is modern, it has many features both for embedded and general purpose use, it has 1st class support on GCC as a frontend. Maybe it does not have a borrow checker as of today, but if you need to harden you can use the Ada/SPARK subset, a very interesting language, that can prove program correctness at compile time.
> Every widget, every style is built at compile time.
Huh. That does sound cool. Does that mean that the XML and CSS is parsed and resolved at compile time? How does that handle dynamic content changes (e.g. content changes in response to user input).
Note that while Blitz applies CSS and runs layout at runtime, the scripting layer (equivalent of JS in the browser or Dart in flutter) is AOT-compiled Rust.
The XML is just a layer, it gets compiled to normal code that creates / operates on the widget tree. On any user input callbacks are just Ada code that can again apply changes to widgets, like states, or add / remove widgets or set properties like label text etc. The CSS is also converted to Ada constants that are used by the styling engine at runtime. You can check the getting started, it shows how it is done both as pure Ada or as XML/CSS.
There's so much repetition in there. E.g.: (adi-json.adb)
And what's the deal with those filenames? If you replace adi- with TIMMEH, you'll see what I mean.Code should be more DRY (don't repeat yourself).
GNAT (not Ada) has an implementation restriction that you cannot have multiple compilation-units in a single file; I believe that the dot-replacement is a holdover from when GNAT/GCC was dealing with DOS.
I agree on the repetitions those need cleanup. Regarding filenames, it is a GNAT convention (the GCC's ada compiler) where we need to have the package name on it separated by -
Ada has some excellent GENERICs, you can use them to great effect for reducing code-size.
Why would anyone choose XML for a modern GUI layout in 2026? That seems like a mis-step.
Author here, the library itself is pure Ada, the XML UI is just a convenience layer on top of it, there is a code generator that picks it and writes ada packages. happy to hear better alternatives!
I'd recommend ASN.1 for almost everything that XML is used for. Unfortunately, is a [semi-] human-readable file is in your list of 'needs', then that is "mostly" ruled out.
(So, what you could do is use the XML-encoding of ASN.1, and then use _that_ in the place of your (current) XML, and then simply allow eg DER encoded objects.)