← All Workshops

MudEngine Part 10: Desktop with Blitz

Congratulations!

You just ran your MUD as a native GPU-accelerated desktop application — no browser, no WebView, no JavaScript.

What we achieved:

  • Blitz renderer — swapped the browser DOM for a pure-Rust HTML/CSS engine built on WGPU and Vello
  • Target-gated dependency — dioxus-native stays out of the WASM build via [target.'cfg(not(target_arch = "wasm32"))'.dependencies], so dx serve still compiles the web + server binaries
  • Three-way entry point — one main.rs that launches the SSR server, hydrates the web client, or opens the Blitz window depending on the build target; components keep use dioxus::prelude::*
  • Fullstack still works — server functions, WebSocket, and set_server_url() all function unchanged
  • Cross-platform clients — the native window and browser tabs share the same game world
  • Experimental exploration — you experienced the cutting edge of Rust-native UI rendering

What we learned

Resources

📚 What we learned
ConceptHow we used it
dioxus_native::launch_cfg(App, vec![], vec![Box::new(cfg)])Starts a winit window with the Blitz renderer (custom size/title via Config)
Target-gated dioxus-nativeKept out of the WASM graph so tokio's wasm feature gate doesn't break dx serve
set_server_urlConfigures the native client to find the Axum server
Blitz rendering pipelineVirtual DOM → Stylo CSS → Taffy layout → Vello GPU draw
WGPU backendVulkan, Metal, or DX12 — automatic GPU selection
Experimental limitationsMissing CSS features, rendering quirks, pre-alpha stability

|