iOS apps

radlang build --target ios (device) and --target ios-simulator build a syn.window / syn.webview app bundle; build.ios in config.yaml holds its settings (minimumVersion, sign, infoPlist, entitlements, heapReserveMB). This page covers what differs from desktop builds that is not documented with the feature itself (the HTTP client: http.md; workers: sys.md).

Memory layout

iOS gives an app a much smaller virtual address space than a desktop process, and a large file mapping (fs.mapBytesSync of a model, say) needs one contiguous free range. The runtime reserves address space up front and commits pages only as they are used, so these reservations cost no RAM, but they do take address space. On iOS (and Android, which uses the same layout):

Reservation Size Notes
Traced heap (every value) 2 GiB One range for the process. build.ios.heapReserveMB (or build.android.heapReserveMB) sets it at build time; RADLANG_HEAP_RESERVE_MB overrides it at run time. Minimum 64 MB.
Each pending coroutine (async fn) 8 MB stack Released when the coroutine finishes. RADLANG_CORO_STACK_KB overrides it.
sys.worker 8 MB thread stack, and one coroutine on the creating thread that delivers replies

Desktop builds reserve 8 GiB for the heap. Since 1.39 values live in the traced heap, so threads and coroutines no longer reserve arenas of their own.

If mapping a large file fails, fs.mapBytesSync throws unable to map file (<bytes> bytes): <system error>. On a device, lowering heapReserveMB frees address space for it: the heap only needs as much as the program keeps alive at once, which on a phone is far below 2 GiB.

build:
  ios:
    heapReserveMB: 1024

Signing

A device build (--target ios) is signed; a simulator build is not. In config.yaml:

build:
  ios:
    sign:
      identity: "Apple Development: Your Name (TEAMID)"
      profile: ~/profiles/myapp.mobileprovision

identity is a code-signing certificate in the keychain (list them with security find-identity -v -p codesigning); RADLANG_SIGN_IDENTITY overrides it. profile is optional: without it the compiler picks the best installed profile for the bundle ID from Xcode’s profile folders, preferring an exact App ID over a wildcard, then the latest expiry. RADLANG_PROVISIONING_PROFILE overrides both. A profile that does not match the bundle ID or certificate, or has expired, stops the build with the reason.