Looking for this. html + css rendering through wgpu.

This page summarizes the projects mentioned and recommended in the original post on /r/rust

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

    High performance HTML and CSS renderer powered by WGPU (by DioxusLabs)

  • Others have already mentioned inlyne and blitz, however given that you're interested in combining web UI with game/wgpu rendering you may be more interested in bevy_ui (and the higher level APIs like bevy_ui_dsl and belly that sit on top of this). Bevy UI is working on a HTML model and is specifically designed to integrate with Bevy's main game renderer and other infrastructure. It's worth noting that a 0.11 release of Bevy of due in next few days, and that UI is going to be a strong focus of the 0.12 release cycle: which should lead to significant development of bevy_ui, and either a doubling down on the "HTML-like UI" approach or a pivot to a new approach.

  • cosmic-text

    Pure Rust multi-line text handling

  • All of these projects have in common that they use Taffy (the project that I work on!) for box-level layout (which currently gives them block, flexbox, and grid layout) , and are either using or planning to use cosmic-text for text/inline layout. This gives you a decent first approximation of web layout, but it's not perfect and there are major features like float, display: inline-block, position: static, box-sizing: content-box missing. Not to mention that none of these implementations currently resolve CSS selectors, so you are effectively limited to inline styles (if you're interested in something in that direction then you may be interested in https://github.com/vizia/vizia).

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

    A high performance rust-powered UI layout library

  • All of these projects have in common that they use Taffy (the project that I work on!) for box-level layout (which currently gives them block, flexbox, and grid layout) , and are either using or planning to use cosmic-text for text/inline layout. This gives you a decent first approximation of web layout, but it's not perfect and there are major features like float, display: inline-block, position: static, box-sizing: content-box missing. Not to mention that none of these implementations currently resolve CSS selectors, so you are effectively limited to inline styles (if you're interested in something in that direction then you may be interested in https://github.com/vizia/vizia).

  • inlyne

    Introducing Inlyne, a GPU powered yet browserless tool to help you quickly view markdown files in the blink of an eye.

  • Specifically the conversion happens here

  • vello

    An experimental GPU compute-centric 2D renderer.

  • Dioxus is working on this with blitz. It's leveraging wgpu through the linebender group's Vello renderer. Still in early stages.

  • swash

    Font introspection, complex text shaping and glyph rendering.

  • If you were to implement this yourself, i'd look into either swash or cosmic-text for the text rendering stack (this is one of the things you really don't want to write from the ground up). For accessibility, AccessKit has quickly become the standard for communicating with crossplatform accessibility APIs in rust GUI. lightningcss (or its lower level counterpart cssparser) are both decent options for CSS parsing. Taffy handles some of what browsers offer for a layout engine, but is still being worked on.

  • accesskit

    UI accessibility infrastructure across platforms and programming languages

  • If you were to implement this yourself, i'd look into either swash or cosmic-text for the text rendering stack (this is one of the things you really don't want to write from the ground up). For accessibility, AccessKit has quickly become the standard for communicating with crossplatform accessibility APIs in rust GUI. lightningcss (or its lower level counterpart cssparser) are both decent options for CSS parsing. Taffy handles some of what browsers offer for a layout engine, but is still being worked on.

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

    WorkOS logo
  • rust-cssparser

    Rust implementation of CSS Syntax Level 3

  • If you were to implement this yourself, i'd look into either swash or cosmic-text for the text rendering stack (this is one of the things you really don't want to write from the ground up). For accessibility, AccessKit has quickly become the standard for communicating with crossplatform accessibility APIs in rust GUI. lightningcss (or its lower level counterpart cssparser) are both decent options for CSS parsing. Taffy handles some of what browsers offer for a layout engine, but is still being worked on.

  • bevy_ui_dsl

  • Others have already mentioned inlyne and blitz, however given that you're interested in combining web UI with game/wgpu rendering you may be more interested in bevy_ui (and the higher level APIs like bevy_ui_dsl and belly that sit on top of this). Bevy UI is working on a HTML model and is specifically designed to integrate with Bevy's main game renderer and other infrastructure. It's worth noting that a 0.11 release of Bevy of due in next few days, and that UI is going to be a strong focus of the 0.12 release cycle: which should lead to significant development of bevy_ui, and either a doubling down on the "HTML-like UI" approach or a pivot to a new approach.

  • belly

    Define the Bevy UI tree with `eml!`, style it using a very-css-like `ess` syntax and relate data data with `bind!` and `connect!`

  • Others have already mentioned inlyne and blitz, however given that you're interested in combining web UI with game/wgpu rendering you may be more interested in bevy_ui (and the higher level APIs like bevy_ui_dsl and belly that sit on top of this). Bevy UI is working on a HTML model and is specifically designed to integrate with Bevy's main game renderer and other infrastructure. It's worth noting that a 0.11 release of Bevy of due in next few days, and that UI is going to be a strong focus of the 0.12 release cycle: which should lead to significant development of bevy_ui, and either a doubling down on the "HTML-like UI" approach or a pivot to a new approach.

  • vizia

    A declarative GUI library written in Rust

  • All of these projects have in common that they use Taffy (the project that I work on!) for box-level layout (which currently gives them block, flexbox, and grid layout) , and are either using or planning to use cosmic-text for text/inline layout. This gives you a decent first approximation of web layout, but it's not perfect and there are major features like float, display: inline-block, position: static, box-sizing: content-box missing. Not to mention that none of these implementations currently resolve CSS selectors, so you are effectively limited to inline styles (if you're interested in something in that direction then you may be interested in https://github.com/vizia/vizia).

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