codify "platform" into resolution logic, server-fn/fullstack overhaul (#4596)

overhaul dioxus fullstack using a new implementation of server_fn

This PR is a complete rewrite of dioxus fullstack designed to improve compatibility with axum and to fix a number of compilation errors based on feature flag unification plumbing through macros.
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2025-10-03 18:26:19 -07:00
1 parent 8421c3aef0
commit f2b1c6d97f
424 files changed
+17284 -6624

No files matched your search

+5 -5
View File
@@ -17,7 +17,7 @@ dioxus-hooks = { workspace = true }
dioxus-html = { workspace = true, optional = true }
dioxus-history = { workspace = true }
dioxus-router-macro = { workspace = true }
dioxus-fullstack-hooks = { workspace = true, optional = true }
dioxus-fullstack-core = { workspace = true, optional = true }
tracing = { workspace = true }
percent-encoding = { workspace = true }
url = { workspace = true }
@@ -26,7 +26,7 @@ rustversion = { workspace = true }
[features]
default = ["html"]
streaming = ["dep:dioxus-fullstack-hooks"]
streaming = ["dep:dioxus-fullstack-core"]
wasm-split = []
html = ["dep:dioxus-html"]
@@ -47,15 +47,15 @@ cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
# Most of the examples live in the workspace. We include some here so that docs.rs can scrape our examples for better inline docs
[[example]]
name = "hash_fragment_state"
path = "../../examples/hash_fragment_state.rs"
path = "../../examples/06-routing/hash_fragment_state.rs"
doc-scrape-examples = true
[[example]]
name = "query_segment_search"
path = "../../examples/query_segment_search.rs"
path = "../../examples/06-routing/query_segment_search.rs"
doc-scrape-examples = true
[[example]]
name = "simple_router"
path = "../../examples/simple_router.rs"
path = "../../examples/06-routing/simple_router.rs"
doc-scrape-examples = true
@@ -1,7 +1,6 @@
use dioxus_core::Element;
use dioxus_core_macro::rsx;
use dioxus_html as dioxus_elements;
use dioxus_signals::{GlobalSignal, ReadableExt};
#[allow(deprecated)]
use crate::hooks::use_router;
@@ -1,7 +1,6 @@
use dioxus_core::{Element, VNode};
use dioxus_core_macro::{rsx, Props};
use dioxus_html as dioxus_elements;
use dioxus_signals::{GlobalSignal, ReadableExt};
use tracing::error;
@@ -1,7 +1,6 @@
use dioxus_core::{use_hook, Callback, Element};
use dioxus_core_macro::{component, Props};
use dioxus_history::{provide_history_context, History};
use dioxus_signals::Owner;
use std::rc::Rc;
-1
View File
@@ -7,7 +7,6 @@ use dioxus_core_macro::{rsx, Props};
use dioxus_html::{
self as dioxus_elements, ModifiersInteraction, MountedEvent, MouseEvent, PointerInteraction,
};
use dioxus_signals::{GlobalSignal, Owner, ReadableExt};
use tracing::error;
+1 -2
View File
@@ -1,7 +1,6 @@
use crate::{provide_router_context, routable::Routable, router_cfg::RouterConfig, Outlet};
use dioxus_core::{provide_context, use_hook, Callback, Element};
use dioxus_core_macro::{rsx, Props};
use dioxus_signals::{GlobalSignal, Owner, ReadableExt};
/// The props for [`Router`].
#[derive(Props)]
@@ -43,7 +42,7 @@ pub fn Router<R: Routable + Clone>(props: RouterProps<R>) -> Element {
#[cfg(feature = "streaming")]
dioxus_hooks::use_after_suspense_resolved(|| {
dioxus_fullstack_hooks::commit_initial_chunk();
dioxus_fullstack_core::commit_initial_chunk();
});
use_hook(|| {
+10
View File
@@ -953,3 +953,13 @@ impl Display for SegmentType {
}
}
}
// /// Routable is implemented for String to allow stringly-typed apps.
// impl Routable for String {
// const SITE_MAP: &'static [SiteMapSegment] = &[];
// #[doc = " Render the route at the given level"]
// fn render(&self, _level: usize) -> Element {
// unimplemented!("String routes cannot be rendered as components")
// }
// }