Advice for the next dozen Rust GUIs

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • Vrmac

    Vrmac Graphics, a cross-platform graphics library for .NET. Supports 3D, 2D, and accelerated video playback. Works on Windows 10 and Raspberry Pi4.

  • On Windows, the graphics story is more or less OK. The OS includes Direct2D and DirectWrite user-facing APIs.

    It’s now possible to implement an equivalent on all modern platforms which have a 3D GPU. An open-source example in C# https://github.com/Const-me/Vrmac#vector-graphics-engine That particular one requires GLES 3.1, but I’m sure (did it before) it’s also possible to implement comparable stuff on top of GLES2.

    Waiting for target devices to have TFlops of FP32 performance, and good support for compute shaders, is less than ideal. Many currently sold phones, tablets, laptops, and even some desktop PCs, have limited GPGPU capabilities and/or performance. These currently sold devices gonna stay in use for at least couple years in the future.

    Rendering things on CPU is less than deal, because many devices have high-rez displays yet relatively slow CPU and especially RAM.

    Am I missing something? What’s the reason there’re no cross-platform GPU-first 2D graphics libraries, despite GLES2 (or better equivalents) is now universally available, and have been for years?

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • Skia

    Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

  • No, I'm pretty sure it rasterizes vectors using OpenGL ES commands.

    I don't know the code well enough to find good proof, but there's a lot of GLES and I think some DX calls in there. More than if it was just composing.

    https://github.com/google/skia/tree/main/src/gpu/ganesh/gl

  • druid

    A data-first Rust-native UI design toolkit. (by linebender)

  • imgui

    Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies

  • Dear Imgui has a really impressive implementation of detachable tabs. https://github.com/ocornut/imgui/wiki/Multi-Viewports

  • slint

    Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.

  • I just happened to build a little project using Slint last week (https://slint-ui.com/) and found it fairly pleasant, even though it's got some rough edges still. I liked it because I was able to cross-compile to windows from my Mac and from my linux based CI. It supposedly has some sort of native widgets available if you have Qt installed, but I haven't pursued that yet.

    It has a little meta language for describing the UI that gets compiled when you compile the code and that was nice because it catches type and syntax errors at compile time.

    I almost went with Tauri, but the cross-compile story didn't seem quite as good compared to Slint. Tauri does look nice though—web UIs are more flexible than Slint at this point. But for my simple little tool, Slint really hit the spot.

  • lite-xl

    A lightweight text editor written in Lua

  • The problem with slug is not that it isn't open source, it's that it's patent encumbered[1]. If it weren't for the patents, it'd be possible to implement an open source version.

    For font rendering, there are a lot of existing techniques out there, but whichever is best depends on your requirements. There are no silver bullets, and slug certainly isn't one.

    I will say though that most applications probably don't need hardware accelerated font rendering. A software renderer like Freetype2 is going to offer much higher quality results than anything like slug ever could, and with proper caching you can achieve good realtime performance. For a real world example of a text-heavy application that does this, see Lite-XL[2]

    1: The landing page doesn't even mention the word "patent", so here's some evidence: https://twitter.com/ericlengyel/status/1159917092331642880?l...

    2: https://lite-xl.com/

  • WPF

    WPF is a .NET Core UI framework for building Windows desktop applications.

  • WPF is now open source (MIT licensed [1]), and its XAML control templates provide _as data_ a full declarative description of how a native Windows control is supposed to look like (in multiple Windows themes like Aero for Win7, Aero2 for Win10, Luna + Royale for WinXP, and Classic for Win95 look and feel [2]).

    This includes everything like the exact colors and gradient stops and animation timing and vector shapes and accessibility behavior etc. of buttons and scrollbars and everything. Example: [3]

    I wonder what one could learn / achieve trying to "port WPF to rust" / implement a XAML control template renderer in Rust. If you can "simply" parse and interpret those XAML files do you instantly get a native-like GUI that supports the exact look and feel of these different Windows themes? (on any OS!)

    Somehow I think it is not realized how amazing that is!

    [1] https://github.com/dotnet/wpf/blob/main/LICENSE.TXT

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • nanovg

    Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.

  • Getting sufficient antialiasing quality for 2D graphics is difficult on GPUs. https://github.com/memononen/nanovg accomplishes this with GL2/GLES2 level hardware for most of the stuff one would want to render as part of a GUI. My project https://github.com/styluslabs/nanovgXC supports rendering arbitrary paths with exact coverage antialiasing, but requires GLES3.1 or GL4 level hardware for reasonable performance.

  • nanovgXC

    Lightweight vector graphics library implementing exact-coverage antialiasing in OpenGL

  • Getting sufficient antialiasing quality for 2D graphics is difficult on GPUs. https://github.com/memononen/nanovg accomplishes this with GL2/GLES2 level hardware for most of the stuff one would want to render as part of a GUI. My project https://github.com/styluslabs/nanovgXC supports rendering arbitrary paths with exact coverage antialiasing, but requires GLES3.1 or GL4 level hardware for reasonable performance.

  • rust-yew-axum-tauri-desktop

    Rust + Yew + Axum + Tauri + Tailwindcss, full-stack Rust development for Desktop apps.

  • > as you can code everything except for view in Rust

    You can do the whole stack in Rust,

    https://dev.to/stevepryde/create-a-desktop-app-in-rust-using...

    https://github.com/jetli/rust-yew-axum-tauri-desktop

  • yews

  • I recently tried https://github.com/yewstack/yews that looks very much like "React in Rust". It is web oriented through WASM compilation and integration with web technologies, Tauri can be used to bridge the gap and use it for desktop apps but it is probably an excessively complex and impure assembly for that goal.

  • enaml

    Declarative User Interfaces for Python

  • Something like this - https://github.com/nucleic/enaml#dock-item-alerts - this is a Python UI that has the capability (extended through Qt)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Personal review for rust GUI frameworks

    9 projects | /r/rust | 21 Mar 2023
  • Dioxus: User interfaces that run anywhere

    12 projects | news.ycombinator.com | 26 Dec 2022
  • Possible to create both WASM and a desktol GUI at once?

    3 projects | /r/rust | 24 May 2022
  • I am not yet ready to switch to Zig from Rust

    1 project | news.ycombinator.com | 15 Jun 2024
  • Show HN: Castiron – Simple podcast player in Rust

    2 projects | news.ycombinator.com | 12 Jun 2024