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.