Stream: show and tell

Topic: roc-ray graphics and GUI


view this post on Zulip Luke Boswell (Feb 03 2024 at 07:56):

Roc platform for graphics and GUI using zig and raylib.

This platform is still very experimental, but just wanted to share that I've updated the README, and now we have a few examples.

https://github.com/lukewilliamboswell/roc-ray

It's working on apple silicon macos and ubuntu-x64 which is cool (just found a bug reading the mouse position on linux).

view this post on Zulip Luke Boswell (Feb 03 2024 at 07:58):

I'm currently experimenting with the flutter layout algorithm which I hope can make GUIs awesome, but that's early days

view this post on Zulip Anton (Feb 03 2024 at 09:16):

Exciting :)

view this post on Zulip Erkal Selman (Mar 11 2024 at 23:42):

did you see @Martin Stewart's https://github.com/MartinSStewart/town-collab/blob/master/src/Ui.elm ?

view this post on Zulip Erkal Selman (Mar 11 2024 at 23:44):

it would be so nice to have something like imgui: https://flyover.github.io/imgui-js/example/

view this post on Zulip Luke Boswell (Mar 11 2024 at 23:54):

No I hadn't seen that, looks really interesting!

roc-ray was an interesting experiment, and there is still a lot of potential. I think it would be achievable to build out the imgui functionality today, as most of the infrastructure is there and working well.

I didn't get as far with the Action-State exploration as I hoped, I think there is still more to explore there.

I haven't touched it for a few weeks, but I have been keenly following the developments in machengine (zig) and linebender (rust) as they both look like really promising directions for underlying GUI platforms for roc. Or possibly to use roc as the scripting or plugin language for an application written with those libraries. machengine is going the direction of an ECS and they have some cool ideas like gkurve which I think might result in really high performance for GUI. The linebender approach is also interesting with the rust community collaborating towards GUIs and also focussing on GPUs.

view this post on Zulip Erkal Selman (Mar 16 2024 at 13:27):

in this page, he says

We especially avoid high-level C/C++ libraries, such as e.g. Dear Imgui, because in such cases it would be very tempting to want to dive into the internals and adjust things - and we don’t want our users to have to dive into a C/C++ codebase to make changes. In these cases, we intentionally make a choice to write a pure-Zig version instead, even though the initial experience results in less features and capabilities. It is the short-term price we pay to have a better long-term future.


Last updated: Jul 06 2025 at 12:14 UTC