host

Native application entry and Apple view embedding. Enable the host feature in the executable, normally through standalone = ["pax-kit/host"] in the application's Cargo manifest. designtime enables runtime inspection and template changes; it does not start a development server. Production packaging excludes designtime.

fn main() -> Result<(), pax_kit::host::Error> {
    pax_kit::init!()?.run()
}

Native application entry and embedding through the Pax facade.

init! and init_with! initialize in the calling process. They do not parse application arguments or start build tools, development servers, or simulators. Use pax-cli to package applications and run development sessions.

Structs

Application

A prepared native application in the calling process.

Initialization invokes the selected root initializer on the main thread. Consume this value to run a standalone application or mount in a host view.

Implementations

mount
pub fn mount(self, host: ViewHost<'_>) -> Result<MountedApp<'_>, Error>

Mount an explicitly initialized native application in a caller-owned view.

run
pub fn run(self) -> Result<(), Error>

Enter the native application loop in the calling process.

run_with
pub fn run_with(self, options: WindowOptions) -> Result<(), Error>

Run a native macOS application with explicit window options.