Add iOS support via egui-ios crate #7768
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Summary
This PR adds iOS support to egui through a new
egui-ioscrate that provides Swift FFI bindings via swift-bridge.New Crate: egui-ios
The
egui-ioscrate provides Swift-compatible types for embedding egui in iOS apps:InputEvent- Touch, keyboard, and lifecycle events from Swift to eguiOutputState- Cursor, keyboard, and IME state from egui to SwiftCursorIcon- Cursor icons mapped to iOS equivalentsFeatures
Minimum iOS Version: 13.0
Changes
egui-ioscrate with Swift FFI bindings (369 lines of Rust)xtask bundle-ioscommand for building iOS app bundlesFiles Added/Modified
crates/egui-ios/xtask/src/ios.rsxtask/src/main.rsCargo.tomlREADME.mdCHANGELOG.mdKnown Limitations
arboardcrate doesn't support iOS yet, so apps should implement clipboard viaUIPasteboardin SwiftIntegration Example
A typical SwiftUI integration involves:
MTKViewfor Metal renderingInputEvent::from_*methodsOutputStatefor keyboard/IME stateUITextFieldoverlay for text input with autocomplete/autocorrectTest Plan
aarch64-apple-iostargetaarch64-apple-ios-simtargetcargo xtask bundle-ioscreates valid .app bundle🤖 Generated with Claude Code