2026-09-03 10:03:15 +00:00
|
|
|
mod api;
|
2026-08-20 15:04:14 +00:00
|
|
|
mod app;
|
|
|
|
|
|
|
|
|
|
#[cfg(feature = "server")]
|
|
|
|
|
mod server;
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
#[cfg(feature = "server")]
|
|
|
|
|
server::init_tracing();
|
|
|
|
|
|
2026-09-15 10:36:22 +00:00
|
|
|
// `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"))]
|
2026-08-20 15:04:14 +00:00
|
|
|
dioxus::launch(app::App);
|
|
|
|
|
}
|