I’m planning to build a Markdown-based note-taking application in Zig with Vim-style editing and keyboard-driven navigation.
I’m looking for recommendations on GUI libraries or frameworks that would be a good fit for this type of project. One of my main concerns is text rendering quality, as the application will spend most of its time displaying and editing text. I also need good Markdown rendering capabilities and support for modern font features.
Some features I’d eventually like to support include:
Markdown editing and preview
High-quality font and text rendering
Rich Markdown rendering
Multiple panes/views
File explorer/sidebar
Vim-style keybindings
Cross-platform desktop support
I would prefer a Zig-native GUI library. However, I’m also open to Zig bindings or wrappers around C/C++ libraries, as long as the Zig API is well designed and I don’t have to interact directly with @cImport or write C/C++ code myself.
I’m still exploring the Zig ecosystem, so I’d appreciate hearing about the available options, their strengths and weaknesses, and any projects that might serve as good references.
What GUI library would you recommend for a project like this, and why?
DVUI - repo is a great one that I have used. It is actively maintained and has all the widgets you would need to get started. This would be my recommendation. Fizzy is built using DVUI, so it is a proven system.
There have been a few more created recently that you can find in Ziggit. There have been a couple posts in Showcase. I can’t vouch for those as I have not personally looked into them.
I’ve been using DVUI to build a full rewrite of one of my apps into Zig and it’s been a good experience overall. In less than a week I basically re-implemented most of the frontend which was the part I was most concerned about. So I’ll be continuing to use DVUI for all of my GUI projects that use Zig, and I’m starting to implement the backend soon. I’m very excited about it.
I have renderers for plain ANSI console output, HTML, a formatter, and Neovim. I’m also considering splitting out the core parser into its own library (separate from the CLI and renderers) to keep that dependency-free and make it easier to use in other applications.
I was thinking about a GUI mostly because the whole project idea started when I’ve seen ZenNotes.
I liked the idea, so a note taking app using vim motion as main, but not the way it was implemented: Electron, so bloat of crap inside bundled with it.
So I tought about re-doing it in Zig as a project, if it goes on also a TUI version would’t be bad
Yes, why not. I’m simply a terminal-first guy who wants to leave my foot instance for as few applications as possible. Thus, I also wrote a simple vim-like note taking TUI for my personal usage (based on fff). However, I would like to see a more advanced approach. But thats not your wish to fulfill
Replying to myself on Slint. While it’s genuinely slick, its licensing was a headache for a real project I needed to build with it and I ended up going with DVUI.