Swift GUI apps on MacOS, Linux, Windows

A bit more than a year ago I started to create a GUI framework for Swift which can be used on multiple platforms.

This is what the demo looks like (not quite, some things are currently broken):

repo: github.com/VertexUI/VertexGUI

I confirm that it can currently run on Linux, MacOS and Windows.

Skia is used to draw the UI elements. Therefore the style of the application is independent from the default platform design.
In this way VertexGUI is similar to Flutter, which uses Skia as well. Because of this, in theory, VertexGUI should be able to run on the same platforms as Flutter, which are Linux, MacOS, Windows, iOS and Android. I have never tested it on iOS or Android so far though.

The currently implemented UI elements are very basic. I mainly use the framework to create image datasets by letting users mark points on an image and to display output images from machine learning algorithms.

There are a lot of things to do to make this a full-fledged GUI framework. The code is not well documented and not well organized due to the experimentation I had to go through.

If you are interested in discussing design details, architecture or (re-)implementing features, write a message here or on GitHub.

Someone noted that this framework might be used as a backend for Tokamak, which is an open-source SwiftUI reimplementation. VertexGUI has an own layout engine and the created Widget instances are kept alive as long as the Widget is displayed. A View from Tokamak could be mapped to a Widget in VertexGUI. If the Views from Tokamak are recreated because data changed, the underlying Widgets can be updated. This might be interesting to you @Max_Desiatov

8 Likes

Nice job and thank you! I'll be sure to take look at the repo more. As I'm sure you can imagine, cross platform GUI capabilities with swift is a widely requested feature. And seeing the community extend the capabilities of the hard work provided by others (like using compnerd's windows support!) is exciting :slight_smile:

EDIT: also wow, I thought your username looked familiar. I was LITERALLY just looking at your profile an hour ago by chance because you're the first result that pops up for Vulkan + swift bindings ;)

Haha, thank you.

I'll soon publish a repo with two basic Vulkan renderers written in Swift. One doing rasterization and the other one doing raytracing with compute shaders.

Terms of Service

Privacy Policy

Cookie Policy