launch
should not be in prelude and LaunchBuilder
and associated configs need to be reworked
#2965
Labels
Milestone
Feature Request
The
launch
function for dioxus apps should not be in the prelude. Since this function is used only once in dioxus apps, it does not belong in the prelude which is intended as a utility support glob import.To launch a dioxus app, you should go through the
dioxus::launch
function:This is generally just "good practice" to only include the minimal set of functions/traits in the prelude, as well as making it possible to discover other, new functions by using intellisense. We can then make things like the LaunchBuilder accessible via the
launch
module:Clean up the
launch
crate:The launch system we have now is supported by a bunch of macro_rules that make understanding
launch
quite confusing.By default, we even mark
launch
as deprecated when no features are enabled, makinglaunch
even more confusing when using it with a default rust-analyzer setup.This is also wired up into a build.rs and env!() calls that break proper caching, leading to very long incremental compile times.
The new design:
impl Config
but not be connected to the renderer)launch_desktop
,launch_mobile
, etc.Notes
I originally took a stab at this in #2779 but dropped those changes since they added 100+ changed files and should be in their own PR.
The text was updated successfully, but these errors were encountered: