← All Workshops

MudEngine Part 10: Desktop with Blitz

Step 3 / 12

Add dioxus-native

The dioxus-native crate provides the Blitz renderer for Dioxus. It wraps the core Dioxus virtual DOM with a native window powered by winit and renders HTML/CSS via Vello (a GPU-accelerated 2D vector engine).

The crate is published on crates.io at version 0.7.9, matching the Dioxus 0.7 ecosystem.

Add dioxus-native alongside the existing dioxus (with fullstack) dependency. The dioxus-native crate depends on the same dioxus-core, dioxus-html, and dioxus-signals crates, so they share the same types and macros.

We also keep the server feature for the Axum server binary:

mud-engine/Cargo.toml
[package]
name = "mud-engine"
version = "0.1.0"
edition = "2024"

[dependencies]
dioxus = { version = "0.7", features = ["fullstack"] }
dioxus-native = "0.7"
dioxus-fullstack = "0.7"
serde = { version = "1", features = ["derive"] }
toml = "0.8"
tokio = { version = "1", features = ["sync"] }
uuid = { version = "1", features = ["v4"] }

[features]
default = ["web"]
web = ["dioxus/web"]
server = ["dioxus/server"]
🔍 What's in dioxus-native

The dioxus-native crate pulls in several subsystems:

CrateRole
blitz-domThe core DOM abstraction — style resolution, layout, event handling
blitz-shellWindow integration — winit event loop, AccessKit accessibility
blitz-paintTranslates the DOM tree into draw commands
anyrender / anyrender_velloThe rendering abstraction — Vello draws shapes and text on the GPU
styloMozilla's Servo CSS engine — parses and resolves styles
taffyFlexbox and CSS Grid layout engine
winitCross-platform window and input handling

This is a fundamentally different stack from the system WebView used by dioxus/desktop. Everything is in Rust — no Chromium, no WebKit, no JavaScript.

⚠️ Experimental warning

Blitz is pre-alpha software. You will encounter:

  • Missing CSS features (some selectors, animations, etc.)
  • Rendering glitches (text layout, complex backgrounds)
  • Performance issues (CPU-based Vello fallback on some hardware)
  • API changes between versions

This workshop is an exploration of where Dioxus native rendering is headed, not a production-ready setup. Expect to file bugs if things go wrong!

Step 3 / 12