Skip to content

Add dioxus-core facade crate and base the dioxus prelude on it - #6024

Merged
nicoburns merged 5 commits into
mainfrom
devin/1793248634-dioxus-core-facade
Oct 29, 2026
Merged

nicoburns merged 5 commits into
mainfrom
devin/1793248634-dioxus-core-facade

Conversation

@nicoburns

@nicoburns nicoburns commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds dioxus-core (packages/core), a facade over the Core layer, so libraries can depend on the UI core without the Framework-level dioxus umbrella. The crate published as dioxus-core through 0.7 is now dioxus-vdom (#6021). The crate docs explain this.

dioxus-core

  • Always depends on dioxus-vdom, dioxus-vdom-macro and dioxus-config-macros. It does not depend on crates it doesn't use: vdom-template, rsx, stores-macro and html-internal-macro are already reached through vdom, vdom-macro, stores and html.
  • Features (the default is everything except ssr and wasm-split):
    macro      = []
    signals    = ["dep:dioxus-signals"]
    hooks      = ["dep:dioxus-hooks"]
    stores     = ["dep:dioxus-stores"]
    html       = ["dep:dioxus-html"]
    document   = ["dep:dioxus-document"]
    ssr        = ["dep:dioxus-ssr"]
    wasm-split = ["dep:wasm-splitter", "dioxus-config-macros/wasm-split"]
  • Re-exports each crate as a module: core/dioxus_vdom, core_macro, signals, hooks, stores, html, document, ssr, config_macros, and wasm_split.
  • prelude holds the Core-layer part of the old dioxus::prelude.

Macro roots: dioxus_root() in vdom-macro and router-macro (from #6023) now tries dioxus first, then dioxus-core, and handles renames of either. This means #[component(lazy)] and #[derive(Routable)] route splitting work for crates that depend only on dioxus-core. Routable still needs dioxus-router as a direct dependency.

dioxus

  • Depends on dioxus-core (default-features = false) instead of vdom, vdom-macro, signals, hooks, stores, html, document, ssr, config-macros and wasm-splitter directly. Its features forward to the matching core features (wasm-split → dioxus-core/wasm-split).
  • dioxus::prelude starts with pub use dioxus_core::prelude::*; and then adds the Framework items (launch, router, fullstack, manganis, logger and so on).
  • Existing public paths are unchanged, including dioxus::core, dioxus::signals, dioxus::config_macros and dioxus::wasm_split.

Also: drops dioxus-html's unused manganis dev-dependency.

Tests:

  • packages/core/tests/prelude.rs: covers a component, rsx! and a Store derive using only dioxus_core::prelude::*.
  • packages/core/tests/wasm_split.rs: covers #[component(lazy)] through core.
  • packages/dioxus/tests/core_facade.rs: checks that the umbrella paths still resolve.

@staging-devin-ai-integration
staging-devin-ai-integration Bot force-pushed the devin/1793248634-dioxus-core-facade branch 2 times, most recently from 82b402b to f4ca3dc Compare October 29, 2026 06:51
@nicoburns
nicoburns merged commit 6d30531 into main Oct 29, 2026
23 checks passed
@nicoburns
nicoburns deleted the devin/1793248634-dioxus-core-facade branch October 29, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants