Markerless placeholders/Portals/Multiwindow/const builder/optimized templates#5554
Open
ealmloff wants to merge 366 commits into
Open
Markerless placeholders/Portals/Multiwindow/const builder/optimized templates#5554ealmloff wants to merge 366 commits into
ealmloff wants to merge 366 commits into
Conversation
8 tasks
54cf23a to
c64b2a0
Compare
Co-Authored-By: Evan Almloff <evanalmloff@gmail.com>
Co-Authored-By: Evan Almloff <evanalmloff@gmail.com>
Co-Authored-By: Evan Almloff <evanalmloff@gmail.com>
Replace the type-erased AnyProps (BoxedAnyProps / Box<dyn AnyProps>) approach with a trait-based RenderDriver abstraction for component lifecycle dispatch. Key changes: - New render_driver.rs: RenderDriver trait + BodyDriver (plain components) + DynWriter (sized wrapper bridging dyn WriteMutations into the generic diff pipeline) - VComponent now holds Rc<dyn RenderDriver> instead of BoxedAnyProps + render_fn - ScopeState no longer stores props directly; the driver owns them - scope_arena: new_scope() takes an Rc<dyn RenderDriver>; run_scope_with() replaces the old props-based run_scope() - diff/component.rs: create/diff/remove dispatch through the driver - suspense/component.rs: SuspenseDriver implements RenderDriver for suspense boundaries - Deleted any_props.rs Co-Authored-By: Evan Almloff <evanalmloff@gmail.com>
ealmloff
commented
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Placeholderless
Currently we use comment nodes in several places at runtime and in hydration:
This PR removes all of those in favor of keeping track of the position of nodes relative to an anchor. This lets us:
<!--placeholder8-->when first loaded in fullstack #5548)Templates and const builders
This PR introduces a const builder api for vnodes which builds up a cons list-style template in the type system at the same time as the dynamic values. Since the builder only builds up deep trees of
&'static Node, we can keep the work to condense the template into a more runtime usable flat form into a single method where&mut ConstVecis usable. This helps to keep down compile timesHtml extensions
Html elements are no longer namespaced in
dioxus_elementsand are now trait based which makes them easy to define from user code. We expose a macro to define them which works for the builder api rsx now expands to:Warning
Since html elements are no longer name spaced, there are some breaking changes around what items can be in scope when you use an element. Eg. you need to use
html::main {}instead ofmain {}to differentiate between the main function in your code and the main element builder in htmlPortal support
Core now supports a render id which scopes elementids and events to a specific renderer. This makes it possible to support many desktop windows in the same runtime with shared context, and signals.
TODO:
Stacked on #5571, #5633, #5634
Closes #628
Closes #5548
Closes #4019
Closes #5181
Closes #2467
Closes #1627
Closes #2040