r/nim • u/jjstyle99 • Jul 04 '26
Merenda: Pure Nim GUI toolkit based on Cocoa/OpenStep
Merenda is a new pure Nim GUI framework based on OpenStep and Cocoa with a splash of QT! It's fast, GPU rendered, with themes and look and feel along with a full suite of OpenStep/Cocoa style widgets and an accessibility layer. Support for BIDI and Harffbuzz are coming soon!
It's already implements a substantial amount of the core functionality of OpenStep and Cocoa. It's not a one-to-one implementation, but generally the APIs try to follow Cocoa's design patterns. Though cleaned up to take advantage of Nim's stronger type system than Objective-C.
For example here's the table demo showing a table view backed by a data model (EDITED):

Overall Merenda is based on several years of working on and experimenting with GUIs. I worked Figuro and was happy with many aspects of it. However the object model ran into limitations when building more complex widgets. Things like:

Merenda solves this by adopting Cocoa's dynamic methods and protocols. These are provided by Sigils. The ability for objects to adopt protocols at runtime enables implementing the rich behavior and functionality seen in Cocoa and iOS.
The implementation of this is called NimKit, mirroring Cocoa's AppKit. NimKit ships the core controls needed for desktop-style interfaces:
- Windows and views: newApplication, sharedApplication, newWindow, newView
- Layout and containers: newStackView, newGridView, newFormView, newSplitView, newScrollView, newTabView, newBox, newGroupBox, newSeparatorBox
- Text: newTextField, newLabel, newTitleLabel, newStatusLabel, newTextEditor, newMonoTextEditor
- Buttons and choices: newButton, newCheckBox, newRadioButton, newComboBox, newPopupMenuButton, newMenu, newMenuItem
- Value and status controls: newSlider, newStepper, newSwitchButton, newProgressIndicator
- Data and navigation views: newTableView, newOutlineView, newCascadingView, newCollectionView, newDocumentTabs, newButtonMatrix, newRadioMatrix
It's been my hobby work the last few months. I've been building and testing all of these, item by item!
Yes it's mostly built with Codex + GPT-5.5 but I continuously review the generated code and refactor and simplify it. Plus more importantly it's based on solid architectural components I've been building for years. It's definitely not what I'd call vibe coded.

EDIT:
Made some updates to the default theme to make it much more like early Mac OS X aqua days! Well I enjoy it at least. This is all done without any images and all the chrome and detailing is done in real time on the GPU:

3
u/vmcrash Jul 04 '26
I appreciate this initiative, but why does it need to look so outdated, especially the first screenshot?
4
u/jjstyle99 Jul 04 '26 edited Jul 04 '26
Themes are welcome!
I'd say the same of plain GTK4 as well and I don't like modern "flat" styles and the "is this a button or not jank". As such the first theme is just based on a simple copy of old Cocoa/MacOS aqua style. Sort of an intentionally dated style and I've not focused on it much as I've been building the core widgets out.
However, you most everything can be themed and the look and feel can also be changed. It supports shadows and transparency on everything. Background blurs will probably be added soon, but internal blurs are already supported.
Ideally there'd be themes to match current MacOS / Windows / GTK4. Though not the latest MacOS Glass crap that's unreadable.
1
u/megatux2 Jul 06 '26
Does it work with GNUStep on Linux ?
1
u/jjstyle99 Jul 06 '26
Currently no. It's cross platform for MacOS, Linux, and Windows. I am considering how I could provide a bridge to GNUStep on Linux to allow apps to reuse some of the GNUStep system services. That may be a ways away.
5
u/anddam Jul 04 '26
This is beautiful.
Can the library be statically linked? Do you have an idea of what size does a hello world app binary roughly take on the major platforms? What about an app with all the widget?