Skip to content

WIP: complete Rust store boundary migration#48

Merged
dnakov merged 36 commits intomainfrom
rtv
Mar 27, 2026
Merged

WIP: complete Rust store boundary migration#48
dnakov merged 36 commits intomainfrom
rtv

Conversation

@dnakov
Copy link
Copy Markdown
Owner

@dnakov dnakov commented Mar 23, 2026

Summary

  • cut iOS runtime over to the Rust-owned AppStore/UniFFI architecture
  • move shared state, realtime voice normalization, discovery reconciliation, and boundary typing into codex-mobile-client
  • remove the legacy Swift runtime owners (ServerManager, ServerConnection, ThreadState) and old conversation bridge paths

Key changes

  • add generated/public Rust RPC surface plus handwritten store/reducer boundary modules
  • migrate iOS app/session/conversation/voice flows onto Rust snapshots and updates
  • move voice transcript/handoff normalization and discovery merge/ranking into Rust
  • replace remaining Swift wire-format status parsing with typed UniFFI enums

Verification

  • export RUSTC_WRAPPER=sccache
  • export CARGO_INCREMENTAL=0
  • ./shared/rust-bridge/generate-bindings.sh
  • ./apps/ios/scripts/build-rust.sh
  • cd apps/ios && xcodegen generate --spec project.yml
  • xcodebuild -project Litter.xcodeproj -scheme Litter -destination 'platform=iOS Simulator,name=iPhone 17 Pro' build

Notes

  • WIP PR for the full Rust boundary/store migration.
  • I stashed dirty local changes inside shared/third_party/codex before rebasing (temp-before-rtv-rebase), so this PR only contains the rebased superproject changes.

dnakov added 14 commits March 23, 2026 09:33
- Add fetch-depth: 0 to all workflows with submodules to fix
  shallow clone failing to resolve pinned codex submodule commit
- Update website Android button to link to latest GitHub Release APK
- Shell detection: probe `echo %OS%` for cmd.exe, fall back to
  PowerShell `$env:OS` check
- Use `-EncodedCommand` (base64 UTF-16LE) to invoke PowerShell from
  cmd.exe default SSH shell — avoids all quoting/escaping issues
- Strip CLIXML noise from PowerShell SSH output automatically
- npm install: suppress npm stdout, use CODEX_PATH: tagged output for
  reliable path extraction
- PROFILE_INIT: source each dotfile in a subshell so zsh-specific
  syntax (starship, atuin, zsh-z plugins) cannot crash bash
- Use Write-Output instead of Write-Host for cleaner PS output
- Pin shared/third_party/codex to rust-v0.117.0 tag (4c70bff48)
- Drop android-vendored-openssl.patch (upstreamed)
- Drop realtime-transcript-deltas.patch (upstreamed as
  ThreadRealtimeTranscriptUpdated); migrate bridge to consume new
  typed notification directly in voice.rs
- Rework ios-exec-hook.patch for new upstream context
- Rework client-controlled-handoff.patch for new upstream:
  - client_controlled_handoff + dynamic_tools on ThreadRealtimeStartParams
  - server field on RealtimeHandoffRequested (parsed from tool args)
  - server param in codex tool schema
  - ThreadRealtimeResolveHandoff / FinalizeHandoff RPCs
  - ToolCallRequested event forwarding
  - finalize_rx channel for client-controlled response.create
  - Fanout auto-routing gated on !client_controlled_handoff
- Regenerate codegen (338 types, 76 RPCs)
- Fix upstream API changes: InProcessStartArgs, RemoteAppServerConnectArgs,
  LegacyNotification, ThreadRealtimeStartedNotification.version,
  ThreadRealtimeAudioChunk.item_id, ThreadItem::HookPrompt
- PROFILE_INIT: source dotfiles in subshells
@dnakov dnakov marked this pull request as ready for review March 27, 2026 19:40
@dnakov dnakov merged commit fc93931 into main Mar 27, 2026
1 check passed
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