Skip to main content

main

Macro main 

Source
macro_rules! main {
    (definition = $definition:expr) => { ... };
    ($app:ty) => { ... };
}
Expand description

The binary entry point of an app, identical on every target.

ⓘ
ui::main!(hello::App);                           // a `ResourceApp`
ui::main!(definition = hello::definition);       // fn() -> &'static ApplicationDefinition

On Linux and macOS it runs the native runner with the standard launch modes (--shots, --headless, …). In the browser it registers the app for the page runtime to mount.