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

+8 -1
View File
@@ -2,7 +2,6 @@
//!
//! This module provides the primary mechanics to create a hook-based, concurrent VDOM for Rust.
use crate::innerlude::Work;
use crate::properties::RootProps;
use crate::root_wrapper::RootScopeWrapper;
use crate::{
@@ -12,6 +11,7 @@ use crate::{
scopes::ScopeId,
ComponentFunction, Element, Mutations,
};
use crate::{innerlude::Work, scopes::LastRenderedNode};
use crate::{Task, VComponent};
use futures_util::StreamExt;
use slab::Slab;
@@ -351,6 +351,11 @@ impl VirtualDom {
f()
}
/// Run a closure inside a specific scope
pub fn in_scope<T>(&self, scope: ScopeId, f: impl FnOnce() -> T) -> T {
self.in_runtime(|| scope.in_runtime(f))
}
/// Build the virtualdom with a global context inserted into the base scope
///
/// This is useful for what is essentially dependency injection when building the app
@@ -578,6 +583,8 @@ impl VirtualDom {
.clone()
.while_rendering(|| self.run_scope(ScopeId::ROOT));
let new_nodes = LastRenderedNode::new(new_nodes);
self.scopes[ScopeId::ROOT.0].last_rendered_node = Some(new_nodes.clone());
// Rebuilding implies we append the created elements to the root