HNHacker News
TopNewBestAskShowJobs

ovenpasta

45 karma · joined July 27, 2026

submissionscomments
ovenpasta··on Show HN: A Modern GUI Library for Ada: CSS Styling, XML UI, SDL3
I think depends on the use case, CSS styling, Ada, static self contained executable, portability, simplicity. I'm curious what people think about this, I'm happy with it and use it for my own projects so I thought it would be useful to others. Honestly Adi2 still needs a lot of work to be compared to those big 2 but it is already useful.
ovenpasta··on Show HN: A Modern GUI Library for Ada: CSS Styling, XML UI, SDL3
Thanks! The real work is done in the Adi2 widget engine.

Take a look at: https://github.com/ovenpasta/adi2/blob/master/src/adi-widget... https://github.com/ovenpasta/adi2/blob/master/src/adi-layout... https://github.com/ovenpasta/adi2/blob/master/src/adi-css_st...

Regarding Pascal... yes you would need to rewrite everything I guess, Ada looks similar but it is quite different. Welcome!

ovenpasta··on Show HN: A Modern GUI Library for Ada: CSS Styling, XML UI, SDL3
Thanks!

You can watch the talk at Ada Developers Workshop Vasteras 2026, where I explain some of your questions:

https://www.youtube.com/watch?v=d-RISfK9Sy8

I should write more details in the repo's README file.

Basically, I was quite frustrated with the available solutions vs. my requirements and ended up making my own, and this process took me many years.

Ada is a language that I always admired, but at the time I didn't feel comfortable depending on the available open-source toolchains. GNAT has actually been open source for decades, but a few years ago, with the increasingly accessible FSF GNAT ecosystem, things changed dramatically.

I think people in the embedded world should really consider Ada/SPARK, where you can formally prove program correctness in Ada itself, going much beyond simple memory safety. Also, Ada's mapping of records directly to registers with bit and read/write semantics granularity is unbeatable. I could go on, but plenty of information is readily available online. BTW, I still consider myself a beginner in Ada; I'm perhaps leveraging 10% of its potential. I really recommend giving Ada (or yourself) a chance.

Why not Rust? I considered it, but dropping support for versions earlier than Windows 10 scared me away. It is not an option for my use case, where industrial customers have old operating systems.

SDL3 was a perfect fit as a backend since it abstracts away the hardware perfectly and allows me to focus on my own business. It remains to be seen whether I can abstract it away and let the user choose the backend. I use as few features as I can; for example, for rendering, I use the good old SDL_Renderer API, which does not require specific GPU drivers or features and falls back nicely to software rendering. Drop shadows are simply software-rendered and cached; the same applies to SVG images and Lottie animations. In this way, I simplified the requirements a lot. Then the SDL3_ttf was god send for text.

ovenpasta··on Show HN: A Modern GUI Library for Ada: CSS Styling, XML UI, SDL3
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 -
ovenpasta··on Show HN: A Modern GUI Library for Ada: CSS Styling, XML UI, SDL3
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.
ovenpasta··on Show HN: A Modern GUI Library for Ada: CSS Styling, XML UI, SDL3
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.

ovenpasta··on Show HN: A Modern GUI Library for Ada: CSS Styling, XML UI, SDL3
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!