MudEngine Part 10: Desktop with Blitz
Run the native client
The server/client split works differently with the Blitz renderer. Since dioxus-native builds a native binary (not WASM), dx serve --desktop doesn't apply here — that command uses the wry-based desktop renderer.
Instead, we run the server and client as separate binaries. The dx serve command compiles and starts the Axum server. The native client is a separate process that connects to it.
Terminal 1: Start the server
dx serveThe dx serve command compiles the server binary (with --features server) and the web client WASM bundle (the default). It starts the Axum server on port 8080.
The native client doesn't need to be compiled by dx — it's a separate cargo run invocation.
In a second terminal, run the native client directly with cargo:
cargo runcargo runcompiles the project without theserverfeature- The
#[cfg(not(feature = "server"))]block runsset_server_url("http://localhost:8080") dioxus_native::launch(App)opens a winit window with the Blitz renderer- The renderer loads your CSS from
assets/main.css(viadocument::Stylesheet) — but through Blitz's own CSS parser, not a browser's - The WebSocket connects to the server at localhost:8080
- The MUD UI renders — name screen, grid, sidebar, D-pad — all drawn by WGPU/Vello
Open http://localhost:8080 in a browser alongside the native window to see both clients sharing the same game world.
The native window will have:
- OS chrome — standard title bar, close/minimize/maximize buttons (provided by winit)
- Dark background — the CSS gradient from
assets/main.cssrendered by Vello - No address bar — it's a native app, not a browser
- GPU-accelerated rendering — the WGPU backend uses Vulkan (Linux/Windows), Metal (macOS), or DX12 (Windows)
Because Blitz is experimental, several CSS features used by the MUD may not render correctly:
linear-gradientbackgrounds — may appear as a solid colourbox-shadow— may be missing or incorrecttransition/animation— not implemented yetposition: fixed— the floating player list may not stay pinnedfilter: brightness()— may not work on hover@keyframes— the quest pulse animation won't animate
The UI will still be functional — the grid, buttons, input, and chat will work. It may just look slightly different from the browser version.
This is the nature of an experimental renderer. Each week the Blitz team ships more CSS support.