Hi all, I've been using Nim on Linux for ~3 years now, and I generally enjoy it quite a bit
However, I've noticed quite a lack of momentum in using Nim for the modern desktop Linux stack — this includes things like Wayland, Pipewire, XDG Portals, and other such tech.
I've written a Wayland application launcher in Nim using siwin, an awesome project made by @levovix0 and it worked well enough, but I've been wondering how hard it would be to build abstractions that let everyone build apps/programs targetting Linux in a "comfy" and Nim-ic manner.
Nim already has decent Xlib bindings, but it has next to nil support for Wayland, except a few cases like the aforementioned siwin library. On the complete opposite end, we have Rust, with excellent support for Wayland. This is why a large chunk of programs for Wayland, compositors and clients alike, are written in Rust. However, Nim as a language is perfect here, due to its close-interop with C.
Hence, I've decided to start this project, which lives at this Github org.
The final goal of this project is to make Nim a viable contender for developing programs and applications that target modern desktop Linux. I've started off the project with two libraries:
Nayland provides a low-level wrapper for the Wayland client reference implementation, libwayland-client along with some other goodies like wayland-egl. It can be used to write a windowing library, or standalone if you want that.
Surfer is the more important library here: it provides a high-level windowing library in Nim, with Wayland as a first-class citizen. It provides abstractions for software rendering, as well as OpenGL ES rendering.
Using Surfer, I wrote nitty, a software-rendered terminal emulator in Nim. It was fairly nice to use.
I'm hoping that this project slowly grows into something mature and usable.
Any interest in helping to get up to date Vulkan bindings going? It fits right in there with Wayland and the new graphics stacks.
However the bindings I’ve tried seem pretty broken.
Unfortunately seems to be broken as well. I couldn't get tests/test.nim to compile despite fiddling with imports and deps versions.
It also seems that the imports are mixed up import nimgl/vulkan that redefines core defines like VkHandle. Ideally the vulkan.nim would import what it needed from nimgl/vulkan and export it, or drop the nimgl dep entirely.
I was able to get the fork https://github.com/DanielBelmes/vulkan test running but creating a triangle example from the test ended up just crashing.

I tried getting Nitty running yesterday. It took a while to figure out the native packages needed and extra linking options as I’m running Wayland on FreeBSD.
Unfortunately once it compiled I got an error about resource gl allocation in wrong order or something nothing showed up.
Perhaps related to the whole Linux allocator thing? Seemed to compile fine on FreeBSD though.
I’d like to try again so I can see if I can get it running with FigDraw GPU rendering.