โ† All Workshops

MudEngine Part 4: Single-Player Dioxus GUI

Run it!

Use dx serve to compile the app to WASM and open it in the browser. The CLI starts a dev server with hot-reload โ€” any Rust change automatically triggers a recompilation and page refresh.

Serve the app
dx serve --open
๐Ÿงช Play session

Initially the page shows Town Square highlighted in the grid, with its description below. Try these commands:

  • Type e or east โ†’ the grid highlights Temple Courtyard and the description updates
  • Type s or south โ†’ move to Graveyard (from Temple, south leads to the Graveyard)
  • Type w or west โ†’ Old Bridge
  • Type n or north โ†’ back to Town Square
  • Type help โ†’ see the command list in red feedback text
  • Type xyz โ†’ see "Unknown command" feedback

Every keypress on Enter triggers a re-render. The grid cell and description always reflect the current room.

๐Ÿ’ก Hot-reload

Unlike the REPL (where you had to Ctrl+C and re-run cargo run), dx serve watches for file changes and recompiles automatically. Keep the browser tab open โ€” every save refreshes the page in under a second.

If something breaks, check the dev tools console (F12) for WASM panics or compile errors in the terminal.