Skip to content

iOS: pump_events / run_on_demand + ios_application_main bootstrap#1

Open
Jasper-Bekkers wants to merge 3 commits into
v0.29.xfrom
ios-pump-events
Open

iOS: pump_events / run_on_demand + ios_application_main bootstrap#1
Jasper-Bekkers wants to merge 3 commits into
v0.29.xfrom
ios-pump-events

Conversation

@Jasper-Bekkers

@Jasper-Bekkers Jasper-Bekkers commented Jul 11, 2026

Copy link
Copy Markdown
Member

iOS event-loop support needed to drive breda/Evolve on device. Based on v0.29.x (the rev breda/Evolve pin).

  • Implement pump_events + run_on_demand for iOS (SDL2-style), reusing the existing CFRunLoop observers/state machine; adds a handler-less launch path + install_handler/take_handler + exit_requested.
  • Add winit::platform::ios::ios_application_main(entry: fn()) — owns main, calls UIApplicationMain, defers the user entry via performSelector:afterDelay:0, then runs nested CFRunLoopRunInMode slices.
  • Size the iOS window to the full screen_frame (not the safe area) so it matches the Metal drawable.

Verified: cargo check --target aarch64-apple-ios --no-default-features --features rwh_06.

Seam to tune on-device: the CFRunLoopRunInMode timeout vs. BeforeWaiting-driven redraw cadence — a Resumed-delivery race can leave a launch inactive/black.

🤖 Generated with Claude Code

Jasper-Bekkers and others added 2 commits July 9, 2026 22:40
SDL-style iOS event pump so winit can yield control on iOS: main is owned by
ios_application_main which starts UIApplicationMain and runs the user entry as a
deferred run-loop callback; pump_events/run_on_demand drive CFRunLoopRunInMode
slices, reusing the existing control-flow observers. Enables the
run_on_demand/pump_events modules for ios_platform.

Compiles for aarch64-apple-ios; not yet device-tested.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Jasper-Bekkers
Jasper-Bekkers marked this pull request as draft July 11, 2026 14:03
@Jasper-Bekkers
Jasper-Bekkers changed the base branch from master to v0.29.x July 11, 2026 14:05
@Jasper-Bekkers
Jasper-Bekkers marked this pull request as ready for review July 11, 2026 14:05
Our pump_events port delivers lifecycle events (AboutToWait, …) during the
redraw phase, so this warns every frame. It's expected under this model —
log at trace so it stays discoverable without spamming (and without feeding
in-memory log buffers).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Jasper-Bekkers

Copy link
Copy Markdown
Member Author

This PR merges to v0.29.x but iirc evolve used the "for-evolve" branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant