|
4 năm trước cách đây | |
---|---|---|
.. | ||
.vscode | 4 năm trước cách đây | |
examples | 4 năm trước cách đây | |
src | 4 năm trước cách đây | |
tests | 4 năm trước cách đây | |
Cargo.toml | 4 năm trước cách đây | |
README.md | 4 năm trước cách đây | |
architecture.md | 4 năm trước cách đây |
This is the core crate for the Dioxus Virtual DOM. This README will focus on the technical design and layout of this Virtual DOM implementation. If you want to read more about using Dioxus, then check out the Dioxus crate, documentation, and website.
We reserve the "dioxus" name and aggregate all the various renderers under it. If you want just a single dioxus renderer, then chose from "dioxus-web", "dioxus-desktop", etc.
Dioxus-core builds off the many frameworks that came before it. Notably, Dioxus borrows these concepts:
Dioxus-core leverages some really cool techniques and hits a very high level of parity with mature frameworks. Some unique features include:
There's certainly more to the story, but these optimizations make Dioxus memory use and allocation count extremely minimal. For an average application, it is likely that zero allocations will need to be performed once the app has been mounted. Only when new components are added to the dom will allocations occur - and only en mass. The space of old VNodes is dynamically recycled as new nodes are added. Additionally, Dioxus tracks the average memory footprint of previous components to estimate how much memory allocate for future components.
All in all, Dioxus treats memory as an incredibly valuable resource. Combined with the memory-efficient footprint of WASM compilation, Dioxus apps can scale to thousands of components and still stay snappy and respect your RAM usage.
We have big goals for Dioxus. The final implementation must:
Support advanced diffing strategies (patience, Meyers, etc)
rsx!{ "this is a text node" }
rsx!{
div {}
"asd"
div {}
div {}
}
rsx!{
div {
a {}
b {}
c {}
Container {
Container {
Container {
Container {
Container {
div {}
}
}
}
}
}
}
}