Skip to main content

Module window

Module window 

Source
Expand description

Window hosting — pure Rust.

NSWindow on the Mac, UIWindow on iOS. The shapes differ: an NSWindow takes a content view, a UIWindow takes a root view controller, and only AppKit has a title bar to put a title in.

  • NSHostingView.init(rootView:) via Swift CC (see crate::hosting)
  • NSWindow / NSApplication via the ObjC runtime (see crate::objc)

Both paths use the same dlsym + asm approach — no Swift source code.

Structs§

Window
A native window hosting a SwiftUI view built from Rust.

Functions§

show_window
Show a view in a native window and run the event loop. Never returns.