feedsignal/crates/web/src/main.rs

22 lines
649 B
Rust
Raw Normal View History

mod api;
mod app;
#[cfg(feature = "server")]
mod server;
fn main() {
#[cfg(feature = "server")]
server::init_tracing();
// `dioxus::launch`'s automatic platform detection prioritizes "server"
// over "desktop" when both features are enabled (as they are for the
// desktop build, which embeds the server feature for in-process
// `#[server]` calls) — it would stand up an axum server instead of a
// window. Pick the desktop renderer explicitly in that case.
#[cfg(feature = "desktop")]
dioxus::LaunchBuilder::desktop().launch(app::App);
#[cfg(not(feature = "desktop"))]
dioxus::launch(app::App);
}