pub fn run_with_setup<C: Component>(root: C, setup: impl FnOnce()) -> Result<()>Expand description
run with a setup closure run once, immediately before
root.init() — the desktop half of app!’s setup = { .. } block.
setup runs on this (the UI) thread, after
frust_reactive::ReactiveRuntime::init and under the runtime’s root
[Owner], and therefore before the desktop shell is constructed — which
is the one moment the shell reads set_default_theme’s slot and drains
register_app_fonts’ registry. That is exactly the placement app!’s
Android/iOS arms get for free (both run the block inside the state factory
create_handle/ffi_glue::init calls before building their AppHandle),
so the ordering contract is identical on all three platforms.
A design-system plugin’s installer (frust_glyph::install, or any other
design system’s equivalent) is the intended payload; app code normally
reaches this through app! rather than calling it directly.