DioxusLabs/docsite

Document multi-target setup

ealmloff opened this issue · 0 comments

As mentioned in DioxusLabs/dioxus#2291, we currently don't have great documentation about setting up a project that targets multiple platforms.

A multi platform setup can have one feature per platform:

dioxus = { version = "0.5" }

[features]
desktop = ["dioxus/desktop"]
liveview = ["dioxus/liveview"]
fullstack = ["dioxus/fullstack"]
server = ["dioxus/axum"]
web = ["dioxus/web"]

We should also document or link to documentation about several issues you are likely to run into with a multi target setup:

  • WASM tokio incompatibility
  • Wasm-bindgen desktop incompatibility
  • Setting up target specific features