Skip to content

Other Rust UI backends (Dioxus, egui, iced): open question #12

Description

@Interchouette

Context

v0.1 AOT lowers templates only to Leptos CSR / wasm (browser DOM). That is the contract in docs/SPEC.md. Native widget toolkits are out of scope for this release.

People still ask whether rangular can be “the Angular-shaped layer for every Rust frontend.” This issue records what that would actually mean, what we do, what we do not, and what is still undecided.

Parser, expr, CSS, and Host are renderer-agnostic. Production AOT is not: it emits Leptos view! / IntoView and a HostCell built for Leptos reactivity.

Not the same thing: shell vs renderer

Piece Role
Tauri Desktop shell: window + webview + OS APIs. Not a view engine.
Leptos View engine (current AOT target).
Dioxus Another view engine (rsx!, its own signals).
egui / iced Immediate / retained native UIs. Not HTML/DOM.

A Leptos + rangular wasm build can sit inside a Tauri webview the same way it sits in Chrome. That is still DOM/wasm. It is not an egui or iced backend.

Dioxus is also not Tauri. You can use Dioxus without Tauri, and Tauri without Dioxus.

What we want (committed)

  • Keep v0.1 honest: Leptos CSR only.
  • Desktop via webview (Tauri or similar) is the supported “run on the desktop” path: same templates, same AOT, same wasm.
  • If we ever add another UI crate, it is a separate AOT backend (second emitter + glue), not one magical lowerer for Leptos + Dioxus + egui + iced.

What we do not want

  • One shared backend that targets Leptos, Dioxus, egui, and iced at once. Reactivity, events, and widgets do not match.
  • Claiming rangular “works with any Rust frontend” while AOT still speaks only Leptos.
  • Treating Dioxus-web-in-a-webview as a new language target: that is still “some other engine,” not a free adapter.
  • Native egui/iced as v0.1 work. HTML/SCSS/@for do not map cleanly onto immediate-mode or iced widgets.

Open questions (not decided)

Worth a Dioxus backend later?

  • Same AST, second emitter (rsx! + Dioxus signals instead of Leptos closures).
  • Cost is not the tag mapping; it is reactivity, events, @if/@for, and keeping two emitters on the fixture corpus.
  • Web-only Dioxus is the smaller slice. Dioxus desktop (non-DOM) is a larger gap.

Worth egui or iced backends?

  • Different UI model (no DOM, no component SCSS as on the web).
  • Likely a thin subset of the language, or a poor fit. Maybe never.

Default if we skip extra backends:

  • Stay web-DOM / Leptos. Document Tauri (or any webview) as the desktop shell. Point elsewhere for native widgets.

Roadmap blurb in the README matches this issue. Close this when we either:

  1. commit to Leptos-only (and say so in SPEC/README), or
  2. accept a first extra backend (almost certainly Dioxus web, with a design note), or
  3. explicitly reject egui/iced (or Dioxus) as wontfix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions