Repository navigation
Done
Description
Why: PLAN.md puts iOS at M6, and embed::LayerHost already draws on a CAMetalLayer. Nothing drives it, so no Rune app runs on an iPhone unless the host writes its own view, display link and touch forwarding.
Ask: is the iOS shell wanted now, ahead of M5? A first slice is written and tested on a fork, as a reference to take, change or drop.
Today (0aa0837, from reading the code)
App::runhas no iOS branch: it falls through to the winit path.platform/has no iOS folder, anddisplay_link.rsis macOS only.- Nothing bundles, signs or installs an iOS build.
What the fork branch adds
platform/ios/:RuneViewis aUIViewon aCAMetalLayeroverLayerHost, with the app's state type erased.- Pacing: a
CADisplayLinkasks for 120 Hz and is stepped by onerune::machinestate machine. It rests when nothing moves and never runs in the background. - Input: one finger goes through
Runtime::touch, and light and dark follow the trait collection. - Entry:
rune::runandApp::runstart UIKit on iOS.rune::ios::viewreturns the view for a UIKit or SwiftUI host. - Packaging:
scripts/ios-appstages a bundle, signs it, installs it and launches it.IOS.mddocuments the loop. - Changes to existing files: a
cfgbranch inApp::try_run; onemodand onepub useline;main_queue.rsbuilt for iOS with a timed variant; twocfgattributes so the desktopwindow::runisn't built for iOS; and atimeoutparameter onmac_app_install.py'scommand, which the new script shares. No new dependencies:Cargo.lockis unchanged.
Checked
- iPhone 18 Pro (iOS 27.0.1):
examples/web-hellolaunches, draws, and its list scrolls under a finger. - Simulator (iOS 27.0):
examples/helloandexamples/web-hellodraw,web-hellofollows a light/dark switch, and it uses 0% CPU at rest. - 11 tests step the pacing machine, and 6 cover the script.
Not checked, and not there yet
- Frame rate on the device was not measured, and the background pause was checked by the machine's tests only.
rune::ios::viewcompiles but was not run in a SwiftUI host. Rotation is untested. - There is no soft keyboard, safe-area inset, second finger, VoiceOver or clipboard, and
on_readynever runs. LayerHost::framestill steps toInstant::now(), not the display link's target time.- Only the new tests were run, not the whole suite.
Proposed next slices, one issue each
- Safe-area and keyboard insets into
Cx::safe_area. - Frames timed to the display link's target, and the
LayerHostfixes in GPU limits: a refused configure panics in LayerHost and on the web, an image past the device's largest texture is a validation error, and the Metal backend panics on macOS 11 and 12; fixes are on a fork #588. - More than one finger.
UITextInputon the existingImeandImeTextseam.- VoiceOver from the accessibility tree (iOS and Android: an app built on Rune can pass an independent WCAG 2.1 A and AA audit #110).
Branch: ios-shell of theabecaster/rune, two commits on dev 0aa0837.
Metadata
Metadata
Assignees
Labels
No labels
Activity
KAYOKG commentedon Nov 18, 2026
We build desktop apps on Rune (pinned to
842c28c) and plan to ship a component library on top of it, so mobile matters to us.PLAN.mdgives the order "macOS + Windows + Linux → web → iOS → Android", and this issue is the first iOS slice. Three questions, so we can design for it now:dev, and is M6 still the target? If a tester helps, we can run the slice on our own devices and report back here.platform/android/,InputConnectionfor text, an a11y backend as asked in iOS and Android: an app built on Rune can pass an independent WCAG 2.1 A and AA audit #110), or is it still open after iOS?A short answer is enough. A list in
PLAN.mdwould help everyone building on Rune now.theabecaster commentedon Nov 19, 2026
Thanks! Testing: the
ios-shelllink is gone. The work is now on theiosbranch of my fork, rebased on currentdev.IOS.mdcovers running it on a simulator or device and what works so far. Any feedback on touch, the keyboard or frame rate is welcome here.Staying mobile-ready:
Tx::popup_menu, not raw right-click. Long press opens the same menu.cfg.Cx::safe_area, and keep touch targets around 44 pt or larger.opencodejr commentedon Nov 25, 2026
Thanks for the careful write-up, and for keeping this slice small.
What I checked on current
dev(a9d657f):App::try_runincrates/rune/src/app.rshas a wasm variant and one for everything else, which goes tocrate::window::run(unless--headlessis passed). So iOS still ends up on the winit path.crates/rune/src/platform/has noios/folder, andscripts/has only the macOSmac_app_bundle.pyandmac_app_install.py.PLAN.md§10 lists M6 as the iOS shell,UITextInput,RuneViewfor SwiftUI embedding and split-process dev mode. On "ahead of M5": §13 says the first experimental web target is already in (WEB.md,examples/web-hello), so the order shouldn't block this slice.I found no other issue asking for an iOS shell. #110, #588 and #48 are related and fit your proposed follow-ups. I'm taking this as a feature request for the first slice:
RuneViewoverLayerHost,CADisplayLinkpacing as arune::machinestate machine, one-finger touch, appearance, therune::run/App::runentry, and the bundle/sign/install script. I'll use youriosbranch as the reference.For anyone else reading: the
ios-shelllink in the description is gone; the current work is on theiosbranch, rebased ondev. I haven't built or run it yet, so the device and simulator results above are yours, not reproduced here. Safe-area and keyboard insets, display-link frame timing, multi-touch,UITextInputand VoiceOver are better as their own issues, as you suggest.opencodejr commentedon Nov 25, 2026
I looked at taking the first slice into
devbut didn't make a change.RuneViewon aCAMetalLayer,CADisplayLinkpacing, touch forwarding, an iOS branch inApp::try_run, and the bundle/sign/install script. The environment I work in has no Rust toolchain and no iOS SDK or Xcode tools, so I couldn't build it or launch it on a simulator. Porting it without that would put untested platform code ondev, which apps pin.iosbranch (headd5e50cf1) is now 66 commits and about 17.8k added lines across 254 files on top ofdev. It goes well beyond the slice described here: Core Text emoji,.ipadistribution signing, privacy manifests, icons, a Swift package,ios-liband a site page. I've only looked at its file list, not its code.If you'd like this to land, a pull request from your branch cut back to the first slice would be the easiest to review: the shell, pacing, one finger, appearance, the entry point and
scripts/ios-app, with its tests,IOS.mdand achangelog/unreleased/entry. The rest can follow as the separate issues you proposed. Someone with a Mac will need to build and run it, and whether iOS work starts now is still up to the maintainers.pascalandr commentedon Nov 30, 2026
We did the Android slices with @Hona (#2647, #2697, #2699, #2700, #2724) and ship a Rune app on Android. We would like iOS next and can put time into it now.
Offer: carry this issue's first slice onto current
devas one small reference branch (shell, pacing, one finger, appearance, therune::runentry, the bundle script), then the follow-ups as one issue each, the way Android went. Each slice would be built and run on the iOS simulator in CI on our fork, with screenshots attached. Our device access is limited, so the simulator is the main check.Why re-slice:
theabecaster:ios(d5e50cf) is 66 commits and about 17.8k added lines on a base from 19 November; a trial merge into today'sdevgives 65 conflicts.Two questions before we start:
devnow, and would you take it the same way as Android (one issue per slice, with a reference branch)?theabecaster commentedon Nov 30, 2026
Yes, still on it, and happy for you to base the slices on my branch. Co-author credit works for me. Since your device access is limited, I can review each slice and test it on a physical device. Tag me on the slice issues or for anything iOS-specific in the branch.
feat(ios): add UIKit RuneView shell, CADisplayLink pacing, and rune::…
Hona commentedon Dec 2, 2026
Merged the first M6 iOS shell slice in PR #3239 (
ca92ffe61).Design landed:
crates/rune/src/platform/ios/with aUIView/CAMetalLayer-backedRuneViewoverrune::embed::LayerHost, paced by a main-run-loopCADisplayLink(requesting 120 Hz on iOS 15+) and driven by a purerune::machinestate machine that rests at 0% CPU when idle and pauses/cancels touches immediately on backgrounding or window detach.rune::run/App::runon iOS to launchUIApplicationMainwith a full-screenUIWindowhostingRuneView, and exportedrune::ios::view,rune::ios::view_app, andrune_ios_view_*C FFI lifecycle helpers for UIKit / SwiftUI embedding.UITouchevents,safeAreaInsets(UIEdgeInsets-> RuneCx::safe_area()),Cx::keyboard_inset(), andUITraitCollectiondark/light mode (Cx::system_dark()).main_queue::on_main_after,rune-textCoreFoundation collation and Apple font fallback tables, andrune-gpuwith_layer/nativeon iOS, plus addedexamples/ios-hello(withinclude/RuneView.hand SwiftUI snippet) andIOS.md.Verified vs not run on hardware:
rune(platform::iosstate machine, touch tracker, inset/scale/dark-mode conversions, Dynamic Type),examples/ios-hellounit test, Windows/Linux/Android/WASM builds,scripts/file-size.sh, andcargo check --target aarch64-apple-ios -p rune --lib -p ios-hello(0 errors, 0 warnings).UITextInput, VoiceOver,UIPasteboard, haptics, display-link target timestamp pacing) can proceed as separate issues — please reopen or file a follow-up if anything misbehaves on Simulator or device.feat(ios): type into text fields through UITextInput and follow the k…