Thread overview
Fluid 0.7.3 — a user interface library, now with a reworked I/O system
Feb 16
Artha
Feb 16
Artha
Feb 16
Mike Shah
February 16

Fluid is a user interface library for D. It supports Raylib out of the box, and works on Linux, macOS and Windows.

  • Fluid is declarative, making UI code easier to write and understand.
  • It is prepared to serve responsible apps, and supports HiDPI.
  • Very extensible, providing API for custom nodes or binding devices.
# Start a new project
dub fetch fluid@0.7.2
dub init -t fluid my-project

# Learn the basics
dub run fluid:tour

Two windows on top of each other, both running Fluid powered programs. One shows text "Hello World from Fluid," using the Fluid logo as its text, while the other displays introductory text and a "Hello, World!" example.

Update highlight: I/O system

Despite being a "patch" update — only the last digit has changed — it is one of the largest updates, as I've completely reworked the backend. To perform platform-specific functions, like drawing to the screen, or taking keyboard or mouse input, Fluid defaults to a monolithic FluidBackend interface. This monolith has become very difficult to work with as the library has grown.

To address this issue, I introduced the new, modular I/O system, with the intent of making it naturally integrate with Fluid's node-based tree structure. Any node in the tree now has the capability to replace individual I/O modules, essentially creating an effect system.

The new system is disabled by default, and has to be enabled by adding a system node as the root of the tree:

// Use Raylib 5.5 as the backend
auto root = raylibStack.v5_5(
    label("Hello, World!"),
);

Nodes now opt into each specific I/O system by calling either use or require, depending on whether the system is required or optional:

class RedRectangle : Node {

    // Declare your I/O systems
    CanvasIO canvasIO;

    // Load them
    void resizeImpl(Vector2) {
        require(canvasIO);
    }

    // Use them
    void drawImpl(Rectangle, Rectangle inner) {
        canvasIO.drawRectangle(inner, color("#f00"));
    }
}

This system will completely replace the old backend in Fluid 0.8.0, which makes 0.7.3 a transitional release. If you're writing an app with Fluid, I recommend upgrading and enabling the new I/O system, so you can address issues before the upcoming big release.

There still remain a few issues with the new system, but they will be fixed with further updates.

Full changelog: https://git.samerion.com/Samerion/Fluid/releases/tag/v0.7.3

Keep the Fluid going and sponsor me on Patreon: https://www.patreon.com/samerion

DConf 2025 topic selection

My last talk on DConf 2024 covered Fluid's use of D meta-programming to create its declarative interface. This year, I'm split between Fluid and its parent project, Samerion, as well as my personal attachment to the language.

I would also like to spread the word around and put other conferences on my schedule. I believe topics like Fluid's new I/O system could be very interesting to audiences other than just the D language community, but I'm not very familiar with other options. If you know of any place that would accept talk submissions in this area, please tell me about them!

As for DConf, I would like to know if there's any particular topic relating to Fluid or my work that would be of interest to any of you, so I could prioritize it when choosing the subject of my next talk.

February 16

I would also like to address, following discussion in the last topic, that improvements to Fluid's text layout engine will be added in Fluid 0.8.0. Once I do that, I plan to create a generic interface for text rendering (as an I/O system) before I make further adjustments. This way, it would be possible to experiment with external systems (such as Pango) before committing to another large-scale project.

February 16

On Sunday, 16 February 2025 at 13:25:58 UTC, Artha wrote:
On Sunday, 16 February 2025 at 13:25:58 UTC, Artha wrote:

>

As for DConf, I would like to know if there's any particular topic relating to Fluid or my work that would be of interest to any of you, so I could prioritize it when choosing the subject of my next talk.

Great update!

Some other conferences may be:

  • ACCU (mostly C++, but 20-25% or more are also programming or other language related talks for software engineers)
  • FOSDEM (for open source work)
  • local meetups may be good
  • NDC and Goto conferences seem like they may be appropriate (I have never spoken at those)