Emerging Rust GUI libraries in a WASM world

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

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • egui

    egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native

    I have no beef with deferred mode GUIs except that I have yet to see one with the performance characteristics I need.

    For what it's worth, egui does have an accessibility layer. I haven't gone to any particular effort to wire it up yet (besides what you get by default): https://github.com/emilk/egui/issues/167

  • assemblyscript

    A TypeScript-like language for WebAssembly.

    Exactly, WASM was designed to be very very lightweight... you can put a lot of logic into a very small amount of WASM, but you need a good compiler to do that, or write WASM by hand to really feel the benefit. If you just compile Go to WASM, with its GC, runtime and stdlib included in the binary, yeah it's going to be pretty heavy... Rust doesn't have a runtime but as you said, for some reason, produces relatively large binaries (not the case only in WASM by the way). Probably, the best ways to create small WASM binaries is to compile from C or from a WASM-native language like AssemblySCript (https://www.assemblyscript.org).

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • leptos

    Build fast web applications with Rust.

    For this there's Leptos and a half dozen other "DOM in Rust" frontend frameworks:

    https://github.com/leptos-rs/leptos

    These are already orders of magnitude faster than React, and as the WASM<->DOM bridge improves, will only get faster.

    In about 3-5 years these frameworks will start to consolidate and reach maturity.

  • fastplotlib

    Next-gen fast plotting library running on WGPU using the pygfx rendering engine

    https://github.com/kushalkolar/fastplotlib

    Alternatively, try pygfx for ThreeJS graphics in Python leveraging wgpu. It works great in Notebooks through notebook-rfb. https://github.com/pygfx/pygfx

    If you're adventurous, figure out how to make pygfx work with webgpu via wasm

  • pygfx

    A python render engine running on wgpu.

    https://github.com/kushalkolar/fastplotlib

    Alternatively, try pygfx for ThreeJS graphics in Python leveraging wgpu. It works great in Notebooks through notebook-rfb. https://github.com/pygfx/pygfx

    If you're adventurous, figure out how to make pygfx work with webgpu via wasm

  • silkenweb

    A library for writing reactive single page web apps

    I hope it's OK to add a shameless plug for my Rust WASM framework, Silkenweb [0]. It's similar to Leptos and Sycamore in that it's signals based, but I've put a lot of effort into making it ergonomic without resorting to a macro DSL. It supports all the usual things like SSR and hydration, along with a few nice extras like scoped CSS.

    [0] https://github.com/silkenweb/silkenweb

  • Vale

    Compiler for the Vale programming language - http://vale.dev/ (by ValeLang)

    Reminds me tha I need to check https://vale.dev/

    This is another one that tries to attack the same surface area as rust but aims at being easier.

  • 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.

  • accesskit

    UI accessibility infrastructure across platforms and programming languages

  • bokeh

    Interactive Data Visualization in the browser, from Python

    It sounds like you want BokehJS. It was one of the alternatives I was recommended while I was exploring, but for various reasons my particular use case is not so easy to integrate (plus my backend was already in Rust).

    https://github.com/bokeh/bokeh

    I did do a basic test, and the raw rects-on-screen performance is roughly comparable to my final solution.

  • Carp

    A statically typed lisp, without a GC, for real-time applications.

    Everybody is trying to make a more user-friendly Rust. The problem is that it is not clear yet whether that's possible, and if it is, how it may look. I know Vale and have tried it, though it's extremely early to judge anything so far. It does have a much stronger theoretical background than V, but even the theory is not completely clear at this point.

    There is also Carp by the way: https://github.com/carp-lang/Carp

  • rust-analyzer

    A Rust compiler front-end for IDEs

    Thanks for the ideas! Separating out presentation crate into it's own crate sounds like a great idea. Re "temporarily stopping rust-analyzer", I came across this trick[0] to make RA use a different build path (trading off disk-space for speed, but I mean, disk space is cheap).

    Re: cranelift, I gotta check that out! Thanks for the reminder!

    [0] https://github.com/rust-lang/rust-analyzer/issues/6007#issue...

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