Skip to content

feat(ios): replace the Alpine terminal runtime with Ubuntu - #21

Open
bajrangCoder wants to merge 19 commits into
Acode-Foundation:mainfrom
bajrangCoder:feat/ios-ubuntu
Open

bajrangCoder wants to merge 19 commits into
Acode-Foundation:mainfrom
bajrangCoder:feat/ios-ubuntu

Conversation

@bajrangCoder

@bajrangCoder bajrangCoder commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Depends on #9 — merge that first. This branch is stacked on #9's head (bc81626c), so until #9 lands the diff also shows its commits. Only the last commit (4f4e213f) belongs to this PR. If #9 is squash-merged, this branch will be rebased onto the result.

Summary

Replaces the iOS Alpine terminal with the same ARM64 Ubuntu 24.04 rootfs and launcher scripts that Android uses (#9), running inside the vendored ios-linuxkit emulator with UBUNTU_ROOT=/.

  • Rename: platforms/ios/Alpine → platforms/ios/Ubuntu, the Swift runtime/service (UbuntuRuntime, UbuntuService, …), the C bridge (ubuntu_*), the Ubuntu bridge service, the ubuntu://localhost/ filesystem scheme and the XCTest suites.
  • Emulator patches for glibc/GNU userland (listed in platforms/ios/Ubuntu/README.md): arm64 O_DIRECTORY value, clone3 with pidfd, pselect without a sigmask, mremap across copy-on-write pages, fakefs st_dev/d_type and the synthesized root entry type, sync_file_range as a no-op, and no --no-expose-wasm for Node.js 26.
  • Shared scripts: iOS bundles init-ubuntu.sh and its acode-*.sh modules from Android assets. They gain --prepare (per-boot refresh with no session) and skip Android-only steps (linkerconfig, Android groups, jemalloc wrapper) when UBUNTU_ROOT=/.
  • Android-visible script changes: npm's global prefix is pinned to /usr/local via $PREFIX/etc/npmrc (it defaulted to $PREFIX, outside PATH). command-not-found uses apt-cache pkgnames (apt-cache search took 10 s+ per typo on iOS). libjemalloc2 is installed only where the Node wrapper is used.
  • Migration: installing Ubuntu removes the old Library/Alpine root. Alpine backups are rejected with a clear message.
  • Terminal server: rebinds when a different port is requested, and joins an in-flight bind instead of racing it.
  • Node.js is still not installed by setup (same as Android): setup registers the NodeSource repo and pin, and Node 26 is installed on first use. README corrected.

RohitKushvaha01 and others added 19 commits September 30, 2026 10:46
Run the same ARM64 Ubuntu 24.04 rootfs and launcher scripts as Android
inside the ios-linuxkit emulator (UBUNTU_ROOT=/), and rename the iOS
runtime, bridge service, filesystem scheme (ubuntu://) and tests from
Alpine to Ubuntu.

- Patch the emulator for glibc/GNU userland: arm64 O_DIRECTORY, clone3
  pidfd, pselect without a sigmask, mremap across COW pages, fakefs
  st_dev/d_type and root entry type, sync_file_range, and drop
  --no-expose-wasm for Node.js 26.
- Share init-ubuntu.sh and its modules with Android; add --prepare for
  the per-boot refresh and skip Android-only steps when UBUNTU_ROOT=/.
- Pin npm's global prefix to /usr/local and make command-not-found use
  apt-cache pkgnames.
- Remove the old Alpine root on install and reject Alpine backups.
- Rebind the terminal server when the requested port changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added enhancement New feature or request docs translations labels Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants