Dcanvas: My DlangUI Fork

| D, Open Source

It's been a while.

It appears that I now maintain a fork of DlangUI, a once-popular UI framework for D programming language (as "popular" is applicable to anything D).

I like D for no particular reason. I have never used it in any paying job, but I often reach for it for my pet projects. Some time ago I started working on a desktop GUI app (TBA) and chose DlangUI as my framework. While working on my app, I encountered multiple bugs and framework limitations. DlangUI is (was) mostly a one-man show, so rough edges were expected.

Since my app is just a hobby project without pressure or deadlines, I decided to go on a side quest and just fix whatever was bothering me in DlangUI (big mistake!). I made several smaller commits to the main repository, but quickly decided to leave it alone. The original author had moved on long ago, and the current maintainer wasn't too interested either. So I forked the repo and started a yak-shaving session that has been going ever since.

I was not planning to introduce an official fork or official continuation of any kind. I develop in the open, but didn't advertise my work anywhere. Tinkering at my own pace, with zero commitment and zero maintainer obligations, was pretty cozy. I started by fixing bugs that were, well, bugging me and my app, but quickly decided that I wanted more serious changes.

The original author was as prolific as he was mercurial. The codebase was littered with experiments of various completion levels, most of which I removed. There were five different rendering backends, including a TUI one, an unfinished Android port (Android circa 2016), and, for some reason, an unfinished Minecraft-style voxel game engine? All in all, I cut about 15k lines of code.

In addition to bug fixes, I did some housekeeping and maintenance work, such as bumping dependencies and making sure the framework builds and runs on a recent compiler version (upstream no longer does), together with documentation improvements and usage examples. Around 80 commits deep, and I decided to admit the fact that I have a maintained fork that is mostly, but not quite, a drop-in replacement for upstream. Backward compatibility is a non-goal, but it's not too far (yet) and migration is mostly a trivial import update;

Despite my efforts, the fork is still not really ready for production. DlangUI's heyday was around 2016-2017, and even then the adoption was limited, because, well, D, so the lack of manpower shows. There are plenty of FIXMEs, TODOs, performance wrinkles, bugs big and small. Still, I believe it's now in a better shape than the upstream, and I continue working on it. So I decided to cut v1.0 and present it to the world as is.

The name is Dcanvas. I didn't want to go with anything like DlangUI-next, because, as I said, I do not intend to maintain backward compatibility. I plan to stick to Semver for versioning. Or maybe not, but the bugfix version (1.0.x) will be non-breaking.

A fork with spaghettiA fork. Spaghetti here is not a coincidence, but a metaphor

Disclaimers:

  • Nothing but respect to the original DlangUI author, Vadim Lopatin. The tone of this article might appear grumpy, but solo-developing a desktop UI framework is no small feat. While I probably would be able to do so, I wouldn't be able to do it casually, as a hobby side project. He did. Again, one might argue whether a Minecraft clone belongs in a UI framework, but I wouldn't be able to develop one. He did.
  • I work at my own pace. It's slow, with uneven bursts. Still, it's better than zero pace that upstream has now.
  • I still don't have a 100% mental model of the project and don't feel that I really "own" the code. Some issues that I discovered are currently beyond my capacity. I hope to revisit them later.
  • Did I mention that backward compatibility is a non-goal? That said, I don't plan anything too crazy for version 1.x. All crazy stuff will go to 2.x, when (and if) it happens.

Obligatory LLM note, because it's 2026: I do use LLMs to a certain extent. Mostly as a rubber duck, for code exploration or to compensate for the poor D tooling. I never really go full vibe-coding. Generally, I'm getting more and more bearish about LLMs as time goes.

The code is here: https://gitlab.com/anton999/dcanvas. There is a changelog of sorts that highlights differences with upstream worth mentioning.