DioxusLabs / dioxus

Fullstack GUI library for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
18.5k stars 703 forks source link

Add installation instructions for WSL / Desktop #2321

Open Zertsov opened 2 weeks ago

Zertsov commented 2 weeks ago

Problem

The docs currently don't give a great guide for getting Dioxus to work with WSL.

Steps To Reproduce

Steps to reproduce the behavior:

Expected behavior

Clearer, or any, instructions on how to get Dioxus running on WSL. Also, more details on how to use Desktop or the other web renderers.

Screenshots image

Environment:

Questionnaire

Zertsov commented 2 weeks ago

Here's the series of steps / commands I ran to get things (mostly) up and running, assuming we are past the dx new step:

  1. dx serve --hot-reload --platform desktop (For brevity sake, when I say "serve" going forward, I mean this command)
  2. rustup update
  3. serve
  4. sudo apt update
  5. sudo apt-get install librust-atk-dev
  6. serve
  7. sudo apt install pkg-config libdbus-1-dev libgtk-3-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev
  8. sudo apt-get update
  9. serve
  10. add the export DISPLAY=:0 to profile
  11. serve
  12. sudo apt-get install libxdo-dev
  13. serve <-- Now works
Zertsov commented 2 weeks ago

Another note - even after all this, there are still permission errors when running this:

Connected to hot reloading 🚀
libEGL warning: failed to open /dev/dri/renderD128: Permission denied

libEGL warning: failed to open /dev/dri/card0: Permission denied

** (dioxus-desktop:6506): WARNING **: 14:35:10.523: webkit_settings_set_enable_offline_web_application_cache is deprecated and does nothing.
libEGL warning: failed to open /dev/dri/renderD128: Permission denied

libEGL warning: failed to open /dev/dri/card0: Permission denied