Skip to main content

ios_main

Macro ios_main 

Source
macro_rules! ios_main {
    ($launch:path) => { ... };
}
Expand description

Declares the entry point an iOS application starts at.

iOS is the one platform where the application is the library: the renderer is a Kotlin/Native archive and the two are linked into a single executable, so there is no Activity to load anything and no page to fetch anything. What there is instead is a main, and a main in an application bundle has to be C, so this exports the launch under a name that C can call.

ⓘ
compose_rust::ios_main!(launch);

The export exists only in a build for iOS. Anywhere else nothing calls it, and an unconditional export would collide with the same name in every other application linked into one binary, which is what a benchmark that drives several of them does.