Anyone crazy enough to develop a pure Julia GUI toolbox?

Guys, I miss the days of native windows and buttons. Especially the 3D ones that felt like they were being pushed in when you clicked on them. Of course, we have packages like GTK4, Qt, and Tk. I don’t know if anyone uses them. How successful are these packages when it comes to platform independence? I remember Tk’s appearance being quite primitive. Has anyone tried making something in Java (or any other JVM language) that listens to a socket, accepts JSON formatted commands upon connection, and draws Swing components on the screen? I know Swing is quite old, but at least a native look can be achieved, and Java runs on many systems. We could even embed the JAR file into the package in such a design. We could successfully render it on any computer with Java installed.

As the schmuck who initatated this topic which has been very informative the idea of putting Java or other language embedded into the package or widgets first, in my opinion, kind of violates the “pure” in the initial question. Second adding Java or other language flies ignores of one of the main issues Julia was created for, The Two Language problem.

Im not here to police this topic by any stretch, I do not have the experience or credentials to do this but I did want to make these points

@SergeantMike67 - I completely agree with you; you are absolutely right. I wanted to quickly share what was on my mind, but as you said, this might not be the right place for it. My idea also violates the main idea - it creates a new 2-language problem.

Does it need to be desktop native, or is web based also okay? Perhaps give Bonito.jl a chance.

See also this recent blog post: [ANN] Bonito@v5

Maybe @sdanisch can comment on his ideas about a GUI?

Indeed… (WIP)

The same Julia code running on Linux, Mac and Windows. The UIs are native on each (GTK for Linux) and generated declaratively from the same TOML. The demo visualization is running on CairoMakie, GLMakie, and ModernGL,jl; the latter two are directly wired to Makie/Julia (it’s drawing to the native OS context provided by the declared UI, not image copying). They are wired to the native controls on the left for realtime interaction. The right-most pane is a webview, in this case hosting Codemirror, which, along with xterm.js, is built in, but you can load any HTML or URL to it (e.g. Genie). It is executing on a live Julia 1.13.0 runtime, so code execution from the displayed script is interactive. The underlying runtime is a hybrid console/GUI app; run it from a command line or double-click it. It bundles a compressed Julia runtime, and from there you can further bundle your app code and resources for deployment. This allows for cross-builds resulting in single-file executables for each platform from any of them. HelloWorld.jl is 148MB (Win), 239MB (Linux), and 145MB (Mac - Apple Silicon only) – compare to Electron: 384MB (Win), 295MB (Linux), 319MB (Mac). Additional it is an MCP server itself, and further allows adding and serving Julia-based MCP tools at runtime.

Where can I find the code?

It’s a work-in-progress (WIP), so unreleased, thus no “ANN” in the forum yet. The “code” I was referring to was that specific Julia demo; the base runtime is not Julia, but a compiled, single-file binary for each platform, which are currently on the order of 3-5MB, depending on platform. They would normally come with a bundled Julia, so you don’t need a Julia installation on the target, which is where all the rest of the size comes from. The bundle can be replaced by the end user, and you can also point the runtime to a juliaup-based installed version. It is intended to serve as both a developer’s tool and a deployment mechanism for internal tools.

Hi, this was the part that really got my interest. I would love to learn how. Is your WIP a trimable julia package? But withou a Juia installation how does it know how to communicate with Makie?
(asking this because I’m also developing a GUI, but based on VTK+Qt+Julia, and would love to be able to create a single step installer.

The bundles are fused to the base binary; I think this would be pretty difficult to do without a custom runtime. This is a hybrid: both console and GUI. There are a number of issues to navigate, including signing, terminal attachments, etc. I’ve tried to strike a practical balance between idiomatic Julia and native UI apps with a focus on accessible Julia development and easily deployable, cross-platform internal tools.

The runtime creates native windows and widgets, including OpenGL. It sets the current context and Makie just draws to it, more or less.

There no JuliaC; it covers a different set of requirements. Compilation is on-target using Julia as it was designed. A goal for this project was no-compromises Julia; this should run any Julia script or project unmodified, and you from there you can call the runtime’s API to access the UI and other features from Julia.