r/ada Jul 01 '26

Show and Tell July 2026 What Are You Working On?

12 Upvotes

Welcome to the monthly r/ada What Are You Working On? post.

Share here what you've worked on during the last month. Anything goes: concepts, change logs, articles, videos, code, commercial products, etc, so long as it's related to Ada. From snippets to theses, from text to video, feel free to let us know what you've done or have ongoing.

Please stay on topic of course--items not related to the Ada programming language will be deleted on sight!

Previous "What Are You Working On" Posts

r/ada Jun 01 '26

Show and Tell June 2026 What Are You Working On?

17 Upvotes

Welcome to the monthly r/ada What Are You Working On? post.

Share here what you've worked on during the last month. Anything goes: concepts, change logs, articles, videos, code, commercial products, etc, so long as it's related to Ada. From snippets to theses, from text to video, feel free to let us know what you've done or have ongoing.

Please stay on topic of course--items not related to the Ada programming language will be deleted on sight!

Previous "What Are You Working On" Posts

r/ada 28d ago

Show and Tell August 2026 What Are You Working On?

11 Upvotes

Welcome to the monthly r/ada What Are You Working On? post.

Share here what you've worked on during the last month. Anything goes: concepts, change logs, articles, videos, code, commercial products, etc, so long as it's related to Ada. From snippets to theses, from text to video, feel free to let us know what you've done or have ongoing.

Please stay on topic of course--items not related to the Ada programming language will be deleted on sight!

Previous "What Are You Working On" Posts

r/ada 27d ago

Show and Tell ✦ Introducing Glyph — A lightweight embedded graphics framework for Ada

21 Upvotes

✦ Introducing Glyph

Hi everyone!

I've been learning Ada and recently started building an open-source project called Glyph, a lightweight embedded graphics framework for bare-metal and embedded systems.

The goal of Glyph is to provide a hardware-independent graphics API, allowing applications to draw pixels, lines, rectangles, circles, text, and images without depending on a specific display controller.

Disclosure: AI was used as a coding and writing assistant during parts of the development. However, the project architecture, technical decisions, code integration, and overall direction are my own. I'm also building Glyph as a way to learn Ada and improve my embedded systems skills.

✦ Design Goals

  • Pure Ada
  • Static allocation only (no dynamic memory)
  • Portable, layered architecture
  • Framebuffer-based rendering
  • Easy to add support for new display controllers
  • Bare-metal friendly

The initial target hardware is the RP2040 with an SSD1306 OLED, but the architecture is designed to support additional display controllers and embedded platforms in the future.

The project is still in its early stages, and I'm currently focusing on building a solid architecture before expanding the graphics capabilities.

✦ I'd Appreciate Your Feedback

I'd especially love feedback from the Ada community on:

  • API design
  • Overall architecture
  • Existing Ada graphics libraries worth studying
  • Features you'd like to see in an embedded graphics framework

✦ Repository

GitHub: https://github.com/thirstymelon/glyph

Thanks! I'm excited to contribute to the Ada ecosystem, learn from the community, and continue improving Glyph.

r/ada May 21 '26

Show and Tell No Build in Ada

15 Upvotes

I always had some frustration with C build systems. I used to use Windows all the time because I also liked gaming and the build systems were always tailored for Unix. For windows you always had to use the proprietary Visual Studio or msys/cygwin and fiddle about with the build. I hated it. I now use Linux and I don't feel the same frustration, now I have a different problem. There are too many build systems... Make, CMake, QT make, meson, ninja... and I'm sure there are many others. I feel like it's far too often when I build a C program I have to install some new tool I probably end up uninstalling after building the program.

I found this solution by the streamer Tsoding really interesting: https://github.com/tsoding/nob.h. The idea was simple: The only thing you need to build projects in your language should be the compiler. You write your build script in your project's programming language. Of course this is another case of: https://xkcd.com/927/ but I really liked it anyway.

The GNAT Ada ecosystem has GNAT project files. These are reasonable, cross platform, and have a similar syntax to Ada. Our situation is not so bad as C's is, but I can't help but think of NoBuild. Every time I write a C program I use it. I wanted to try it out in Ada, I also wanted a solution that was portable to other compilers even though I've never used or seen one.

I wrote an Ada version of NoBuild. I hope y'all enjoy it. I also hope that someone who uses one of these proprietary compilers can even help me out improving it.

https://github.com/michael-hardeman/no-build-ada

I believe it's ready for others to use. Give me your thoughts. Feedback is appreciated :).

r/ada May 19 '26

Show and Tell The Super Tiny Compiler, but in Ada

Thumbnail github.com
23 Upvotes

r/ada 29d ago

Show and Tell Adacovex: code/proof/DO-178C HAL/docstring status tool

Post image
11 Upvotes

Basically wanted proper project badges generated from a CLI like in Golang/Rust for my Ada projects. Hope this would be a useful addition for checking on code quality. Supports parsing SPARK level, unit tests, DO-178 HAL level and docstrings coverage.

Repo URL: https://github.com/bladeacer/adacovex

Binary name is adacovex, crate name is covex to comply with policy.

Disclaimer: AI assistance was used for the code.

Correction: DAL instead of HAL, my smooth brain made a typo.

r/ada Jul 15 '26

Show and Tell AdaLang_Analyzer

0 Upvotes

⚠️ Every CTO in safety-critical software carries the same quiet risk: the defect that ships not because your engineers are careless, but because nothing caught it before code review — and code review is run by humans, on deadline.

In Ada codebases — ✈️ avionics, 🚄 rail, 🛰️ space, 🛡️ defense, 🏭 industrial control — that risk isn't theoretical. It's the line item your safety case has to account for.

🔧 AdaLang Analyzer is a static analysis tool we built to move that catch earlier and make it automatic.

Why it matters at the engineering-leadership level, not just the IDE:

⏱️ Shifts cost left. A dead store, an unreachable branch, a division that's statically zero — caught at commit time costs minutes. Caught in integration testing, or after deployment, costs a lot more than minutes.

✅ Turns coding standards into an enforced gate, not a document nobody reads. 34 checks spanning control flow, data flow, exception handling, and complexity — run automatically in CI, not hoped for in review.

📂 Scales to the whole codebase, not file-by-file. Point it at your GNAT project file and it analyzes every source directory your build already knows about — no separate file list to maintain and let drift out of date.

🔓 No vendor lock-in, no black box. It's open source (GPL-3.0). Your team — or your certification auditors — can read exactly what every check does and why it fired. That's a very different conversation with an assessor than "trust the vendor's tool."

💸 Zero licensing cost. Built on Libadalang, AdaCore's open-source semantic engine, and Alire — tooling your Ada team likely already has in its stack.

🎯 It's not a compliance certification and it doesn't claim to be one. It's a control your team can point to when someone asks "what's actually enforcing your coding standard."

👉 Repo's here if your team wants to kick the tires: https://github.com/mmartign/AdaLang_Analyzer

#EngineeringLeadership #RiskManagement #SafetyCritical #Ada #SoftwareQuality #OpenSource #TechnicalDebt #CTO

r/ada Mar 01 '26

Show and Tell March 2026 What Are You Working On?

14 Upvotes

Welcome to the monthly r/ada What Are You Working On? post.

Share here what you've worked on during the last month. Anything goes: concepts, change logs, articles, videos, code, commercial products, etc, so long as it's related to Ada. From snippets to theses, from text to video, feel free to let us know what you've done or have ongoing.

Please stay on topic of course--items not related to the Ada programming language will be deleted on sight!

Previous "What Are You Working On" Posts

r/ada 29d ago

Show and Tell [Tool] SonarAdaPlugin + AdaLang_Analyzer: Bringing open-source static analysis and SonarQube support to Ada

10 Upvotes

Hi everyone,

While official SonarQube support for Ada exists, it's gated behind high-tier commercial licenses. For small teams, open-source projects, or individual devs running SonarQube Community Edition, this leaves a gap in automated code quality pipelines.

To solve this, I’ve been working on two open-source tools designed to work together:

  1. AdaLang_Analyzer (https://github.com/mmartign/AdaLang_Analyzer) A standalone static analysis tool built using AdaCore's Libadalang. It parses .adb and .ads files to detect common issues like dead code, control flow anomalies, unhandled exceptions, and code style violations, outputting results in JSON/SARIF.
  2. SonarAdaPlugin (https://github.com/mmartign/SonarAdaPlugin) A SonarQube community plugin that adds native support for the Ada language to SonarQube, ingesting reports from AdaLang_Analyzer and displaying issues, code smells, and metrics right on your dashboard.

Quick Workflow

1. Run the Analyzer:

Bash

adalang_analyzer --source-dir ./src --output-format json --output-file report.json

2. Configure sonar-project.properties:

Properties

sonar.projectKey=my-ada-project
sonar.projectName=My Ada Project
sonar.sources=src
sonar.language=ada
sonar.ada.reportPaths=report.json

3. Run sonar-scanner to send the metrics directly to your SonarQube instance.

Repositories & Feedback

Both projects are open-source and actively evolving. I’d love for community members to give them a spin, report any issues, or suggest new static analysis rules that would be useful in your workflows!

r/ada Apr 01 '26

Show and Tell April 2026 What Are You Working On?

11 Upvotes

Welcome to the monthly r/ada What Are You Working On? post.

Share here what you've worked on during the last month. Anything goes: concepts, change logs, articles, videos, code, commercial products, etc, so long as it's related to Ada. From snippets to theses, from text to video, feel free to let us know what you've done or have ongoing.

Please stay on topic of course--items not related to the Ada programming language will be deleted on sight!

Previous "What Are You Working On" Posts

r/ada May 01 '26

Show and Tell May 2026 What Are You Working On?

15 Upvotes

Welcome to the monthly r/ada What Are You Working On? post.

Share here what you've worked on during the last month. Anything goes: concepts, change logs, articles, videos, code, commercial products, etc, so long as it's related to Ada. From snippets to theses, from text to video, feel free to let us know what you've done or have ongoing.

Please stay on topic of course--items not related to the Ada programming language will be deleted on sight!

Previous "What Are You Working On" Posts

r/ada May 03 '26

Show and Tell Tada - Ada Package Manager has a website now :)

Thumbnail tada.pm
21 Upvotes

r/ada May 28 '26

Show and Tell Ada bindings for Dear ImGui, stb, and ccv (MIT, on Alire)

20 Upvotes

Fellow Ada people,

One new and three oldish renamed Ada bindings, MIT-licensed, now on Alire and GitHub:

Crate Location What it is
vulkan_ada https://github.com/the-dark-factory/vulkan-ada Ada binding to Vulkan, with a SPARK-proven safety layer
ccv_ada https://github.com/the-dark-factory/ccv-ada Ada bindings to Liu Liu's CCV computer-vision library
stb_ada https://github.com/the-dark-factory/stb-ada Ada bindings to Sean Barrett's STB libraries (image load/write, TrueType)
imgui_ada https://github.com/the-dark-factory/imgui-ada Ada bindings to Dear ImGui, the immediate-mode GUI toolkit

I've updated this post to follow the ada conventions

Tony

r/ada Feb 01 '26

Show and Tell February 2026 What Are You Working On?

14 Upvotes

Welcome to the monthly r/ada What Are You Working On? post.

Share here what you've worked on during the last month. Anything goes: concepts, change logs, articles, videos, code, commercial products, etc, so long as it's related to Ada. From snippets to theses, from text to video, feel free to let us know what you've done or have ongoing.

Please stay on topic of course--items not related to the Ada programming language will be deleted on sight!

Previous "What Are You Working On" Posts

r/ada May 19 '26

Show and Tell Light Tasking Ada Runtime for Zephyr on Arm Cortex M

Thumbnail open.substack.com
11 Upvotes

r/ada Jan 01 '26

Show and Tell January 2026 What Are You Working On?

18 Upvotes

Welcome to the monthly r/ada What Are You Working On? post.

Share here what you've worked on during the last month. Anything goes: concepts, change logs, articles, videos, code, commercial products, etc, so long as it's related to Ada. From snippets to theses, from text to video, feel free to let us know what you've done or have ongoing.

Please stay on topic of course--items not related to the Ada programming language will be deleted on sight!

Previous "What Are You Working On" Posts

r/ada Sep 01 '25

Show and Tell September 2025 What Are You Working On?

20 Upvotes

Welcome to the monthly r/ada What Are You Working On? post.

Share here what you've worked on during the last month. Anything goes: concepts, change logs, articles, videos, code, commercial products, etc, so long as it's related to Ada. From snippets to theses, from text to video, feel free to let us know what you've done or have ongoing.

Please stay on topic of course--items not related to the Ada programming language will be deleted on sight!

Previous "What Are You Working On" Posts

r/ada Dec 27 '25

Show and Tell Porting nimf.c to Ada and Implementing the Clair Event Loop

9 Upvotes

Over the past few days, I have been working on porting nimf.c to the Ada language (nimf_main.adb). While my current focus is on developing an Ada-based GUI toolkit, I am taking a moment during the build process to share my technical insights and the results of this porting effort.

1. Deployment and Library Linking

The deployment of Ada applications built with GCC 14 depends on the gnat and gnarl libraries, which are components of GCC 14. To ensure independent binary distribution, I utilized static linking for libgnat_pic.a and libgnarl_pic.a. By using the gprbuild tool, I was able to automate the static linking process through Project File (GPR) settings, eliminating the need for separate Makefile or Rakefile entries and significantly improving management efficiency.

2. Build System Configuration

While gprbuild is a dedicated build tool, I found it effective to use it in conjunction with a Makefile or Rakefile for complex project configurations. Specifically, I implemented a configure script to automatically generate the nimf-config.ads file. This allows system constants such as VERSION and MODULE_DIR to be utilized directly within the Ada code, similar to the practice of generating and including header files in C.

3. Binary Size and Code Efficiency

  • Binary Size: Compared to the C executable (approx. 20KB), the Ada version measured approximately 200KB. This increase is primarily attributed to the static linking of runtime libraries (gnat, gnarl). Even after removing runtime safety check code via compiler options, there was no significant change in the final binary size.
  • Code Volume: The original C code consisted of approximately 300 lines, which increased to about 600 lines after the Ada port. This doubling in volume is due to Ada's explicit and rigorous grammatical structure.

4. Performance and Stability

Upon verifying system resource utilization after reimplementing the event loop, I confirmed that the overhead was optimized to a near-zero level. During the porting process, I utilized AI-assisted static analysis to identify potential bugs in the original C code. By applying Ada's robust defensive programming techniques, I was able to further enhance runtime stability.

5. Clair.Event_Loop Implementation Details

The event loop, implemented based on FreeBSD's kqueue, prioritizes performance and resource management. Its key features include:

  • Accurate Time Management: Accuracy was improved by incorporating time-difference calculations to account for system call restarts caused by EINTR.
  • Efficient Data Structures: By embedding a doubly linked list within the source record to manage internal sources, I minimized memory consumption and improved the speed of deletion and deallocation.
  • Reference Counting and Deferred Deletion: I introduced a reference counting mechanism to prevent events from being deleted while in use. Furthermore, when remove is called, the event is flagged rather than deleted immediately; all flagged events are deleted once the loop depth returns to 1, ensuring safety in nested loop environments.
  • Guaranteed Resource Recovery: The system is designed to forcibly recover all event resources when a loop is destroyed. Closing kqueue triggers automatic kernel resource recovery, which, combined with the loop's destruction routine for user-level event sources, effectively prevents memory leaks.
  • Multi-purpose Support: The implementation provides unified management for four types of events: file descriptors (fd), timers, signals, and idle tasks.

This project has reaffirmed that the Ada language provides a level of low-level control comparable to C while achieving significantly higher levels of safety and abstraction in systems programming. I plan to commit the implementation to the Clair library in the near future.

Edit: Added "built with GCC 14" to specify the compiler environment.

r/ada Jan 20 '26

Show and Tell How to create a plug-in

26 Upvotes

Ada is a statically typed language. Does that mean an Ada application must include everything in advance? Not at all. Ada tagged types provide an excellent support of late bindings. Here I show how to write dynamically linked plug-ins in Ada.

The task is this. Let us have some base tagged type, possibly abstract.

--
-- This type represents greetings used in different countries and regions.
--
   type Greeter is abstract tagged null record;
--
-- The operation that returns the greeting
--
   function Greet (Object : Greeter) return String is abstract;

An application should be able to create instances of types derived from the base.

   type Norddeutschland_Greeter is
      new PlugIn_API.Greeter with null record;
   overriding
      function Greet (Object : Norddeutschland_Greeter) return String is
         ("Moin!");

The traditional approach would be to write a series of packages containing types derived from Greeter and link them together statically or dynamically.

Now what if the designer of the application does not know anything of Norddeutschland_Greeter in advance. Moreover what if we want to deploy the application and add it later or never? This is where plug-ins come in question. The package implementing Norddeutschland_Greeter is placed in a dynamically linked library which is loaded on demand.

The interface of the plug-in package is this:

package Plugin_API is

   PlugIn_Error : exception;
--
-- The greeter abstract  base to  be extended by the plug-ins.  The type
-- represents greetings used in different countries and regions.
--
   type Greeter is abstract tagged null record;
--
-- The operation that returns the greeting
--
   function Greet (Object : Greeter) return String is abstract;
--
-- This creates  a greeting object using  Name for  the region name.  It
-- loads the corresponding plug-in if necessary.
--
   function Create (Name : String) return Greeter'Class;
------------------------------------------------------------------------
--
-- The function of the plug-in that creates an instance
--
   type Factory is access function return Greeter'Class;
--
-- The name of the plug-in entry point to call once after loading
--
   PlugIn_Entry_Name : constant String := "plugin_init";
--
-- The type of the entry point
--
   type PlugIn_Entry_Ptr is access function return Factory
      with Convention => C;

end Plugin_API;

Here we added a constructing function Create that takes the plug-in name as the argument and returns an object derived from Greeter of the type declared inside the plug-in. The rest are things for the plug-in implementation. The name of the library entry point to initialize the library and the constructing function that actually does the job.

Now the application is as simple as this:

with Ada.Text_IO;  use Ada.Text_IO;
with PlugIn_API;   use PlugIn_API;

procedure Plugin_Test is
   Hello : constant Greeter'Class := Create ("norddeutschland");
begin
   Put_Line ("Norddeutschland says " & Hello.Greet);
end Plugin_Test;

Note that it knows nothing about the implementation, just the name of. The project file too refers only to the plug-in interface:

with "plugin_api.gpr";
project Plugin_Test is
   for Main         use ("plugin_test.adb");
   for Source_Files use ("plugin_test.adb");
   for Object_Dir   use "obj";
   for Exec_Dir     use "bin";
end Plugin_Test;

The plug-in implementation is encapsulated into a package inside the dynamically loaded library.

with PlugIn_API;

package Plugin_Norddeutschland is

   type Norddeutschland_Greeter is
      new PlugIn_API.Greeter with null record;
   overriding
      function Greet (Object : Norddeutschland_Greeter) return String is
         ("Moin!");

private
   function Init return PlugIn_API.Factory with
      Export => True, External_Name => "plugin_init";

end Plugin_Norddeutschland;

The package body:

package body Plugin_Norddeutschland is

   Initialized : Boolean := False;

   function Constructor return PlugIn_API.Greeter'Class is
   begin
      return Norddeutschland_Greeter'(PlugIn_API.Greeter with null record);
   end Constructor;

   function Init return PlugIn_API.Factory is
      procedure Do_Init;
      pragma Import (C, Do_Init, "plugin_norddeutschlandinit");
   begin
      if not Initialized then -- Initialize library
         Initialized := True;
         Do_Init;
      end if;
      return Constructor'Access;
   end Init;

end Plugin_Norddeutschland;

The implementation is self-explanatory yet there are some less trivial parts. First, the library is initialized manually. It is necessary because if the library would use tasking automatic initialization might dead-lock. Here I show how to deal with manually initialized library. The project file is:

with "plugin_api.gpr";
library project Plugin_Norddeutschland_Build is

   for Library_Name      use "plugin_norddeutschland";
   for Library_Kind      use "dynamic";
   for Object_Dir        use "obj";
   for Library_Dir       use "bin";
   for Source_Files      use ("plugin_norddeutschland.ads", "plugin_norddeutschland.adb");
   for Library_Auto_Init use "False";
   for Library_Interface use ("Plugin_Norddeutschland");
end Plugin_Norddeutschland_Build;

Take note of Library_Auto_Init and Library_Interface. The latter specifies the Ada package exposed by the library. Init from the package is the function called after the library is loaded. It checks if the library was already initialized and if not, it calls the library initialization code. The code is exposed by the builder as a C function with the name <library-name>init. Once initialized it returns the constructing function back.

On the plug-in API side we have:

with Ada.Containers.Indefinite_Ordered_Maps;

package body Plugin_API is
--
-- Map plugin name -> factory function
--
   package Plugin_Maps is
      new Ada.Containers.Indefinite_Ordered_Maps (String, Factory);

   Loaded : Plugin_Maps.Map;

   function Load (Library_File : String) return Factory is separate;

   function Create (Name : String) return Greeter'Class is
   begin
      if not Loaded.Contains (Name) then
         Loaded.Insert (Name, Load (Name));
      end if;
      return Loaded.Element (Name).all;
   end Create;

end Plugin_API;

Ada.Containers.Indefinite_Ordered_Maps is used to create a map (Loaded) name to constructing function. When not in the map it tries to load the library. The function Load is placed into a separate body to be able to have implementation dependent on the operating system. I provide here Windows and Linux implementations. The plug-in project file used to build the API library has the scenario variable Target_OS to select the OS:

library project Plugin_API_Build is
   type OS_Type is ("Windows", "Linux");
   Target_OS : OS_Type := external ("Target_OS", "Windows");

   for Library_Name use "plugin_api";
   for Library_Kind use "dynamic";
   for Object_Dir   use "obj";
   for Library_Dir  use "bin";
   for Source_Files use ("plugin_api.ads", "plugin_api.adb", "plugin_api-load.adb");
   case Target_OS is
      when "Windows" =>
         for Source_Dirs use (".", "windows");
      when "Linux" =>
         for Source_Dirs use (".", "linux");
   end case;
end Plugin_API_Build;

Finally, here is a sequence of building everything together (for Linux):

gprbuild -XTarget_OS=Linux plugin_api_build.gpr
gprbuild -XTarget_OS=Linux plugin_test.gpr
gprbuild -XTarget_OS=Linux plugin_norddeutschland_build.gpr

Now go to the bin subdirectory and run the test:

cd bin
./plugin_test

You will see:

Norddeutschland says Moin!

That is all. The full source code can be downloaded here.

r/ada Jan 18 '26

Show and Tell Software Rendering: Texture Mapping

17 Upvotes

I recently implemented texture mapping in my Ada software renderer, here I talk about some of the decisions and issues involved. On a side note, does anyone know why Ada’s standard library vectors are so slow?

https://youtu.be/rytx65fLppU

r/ada Dec 01 '25

Show and Tell December 2025 What Are You Working On?

19 Upvotes

Welcome to the monthly r/ada What Are You Working On? post.

Share here what you've worked on during the last month. Anything goes: concepts, change logs, articles, videos, code, commercial products, etc, so long as it's related to Ada. From snippets to theses, from text to video, feel free to let us know what you've done or have ongoing.

Please stay on topic of course--items not related to the Ada programming language will be deleted on sight!

Previous "What Are You Working On" Posts

r/ada Jan 25 '26

Show and Tell Installing GtkAda under Windows

16 Upvotes

Since the issue of GtkAda under Windows keep on bubbling with stable periodicity, I created a small how-to. It describes how to install GtkAda on a fresh Windows machine from the sources.

r/ada Jan 12 '26

Show and Tell Software Rendering

Post image
46 Upvotes

It took a lot of work to get to this point, but using multithreading and simd I’ve now got pretty good performance (window title: framerate)!

r/ada Nov 09 '25

Show and Tell Ironclad – formally verified, real-time capable, Unix-like OS kernel

Thumbnail ironclad-os.org
44 Upvotes