Repository navigation
Re-baseline the uniffi iOS and Android size budgets - #1414
Merged
Merged
Conversation
Contributor
Changeset ✓This PR includes a changeset covering all affected packages:
|
The livekit-uniffi 0.1.10 release failed both size gates. Data streams v2 (#1286) bumped only ANDROID_SIZE_LIMIT_BYTES, leaving the iOS budget at 1152 KiB while the same async foreign-trait machinery landed in that slice too, so it measured 1433 KiB. Android was a separate, ordinary 8 KiB of creep past its 1536 KiB limit at 1544 KiB. Both limits are re-baselined on the measured 0.1.10 sizes with 10% headroom, rounded up to a 64 KiB boundary. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
pblazej
force-pushed
the
blaze/bump-uniffi-size
branch
from
September 9, 2026 07:05
18bd072 to
31ecd85
Compare
davidliu
approved these changes
Sep 9, 2026
lukasIO
added a commit
that referenced
this pull request
Nov 4, 2026
The 0.13.3 Swift and Android packages were not published, because both size gates failed in the "UniFFI packages" run for `livekit-ffi/v0.13.3`. The iOS `ios-arm64` framework binary is 1926 KiB, against a limit of 1600 KiB. The Android `arm64-v8a` `.so` is 2145 KiB, against a limit of 1728 KiB. The growth comes from the signaling client (#1521), which joined `core-modules` in 0.13.3. Swift and Android cannot use the signaling client until a package with it is published. ## Change Both budgets are re-baselined on the measured 0.13.3 sizes, with 10% headroom rounded up to 64 KiB, as in #1414. `SPM_SIZE_LIMIT_BYTES` goes to 2176 KiB, and `ANDROID_SIZE_LIMIT_BYTES` goes to 2368 KiB. Each comment records its baseline. The changeset bumps `livekit-ffi` as a patch, so the next release has the new budgets and can publish both packages. ## Verified I built the release slices locally with the same flags as CI: `--no-default-features --features core-modules`, and `cargo ndk` with `-C force-unwind-tables=no` for Android. | Build | iOS dylib | Android `.so` | |---|---|---| | `livekit-ffi/v0.13.2` | 1448 KiB | 1557 KiB | | `main` without the signaling module | 1484 KiB | 1592 KiB | | `main` | 1926 KiB | 2146 KiB | - The `main` sizes match the CI run to within 0.1%. - Signaling adds 443 KiB on iOS and 554 KiB on Android. All other changes since 0.13.2 add about 35 KiB. - `cargo bloat --crates` on iOS shows that the code section grows by 266 KiB. The largest parts are `livekit_signaling` (81 KiB), `url` with `idna` and `icu_normalizer` (49 KiB), `std` (34 KiB) and `livekit_protocol` (21 KiB). The rest of the growth is data and unwind tables. - `livekit-signaling` enables the tokio features `net`, `signal` and `io-util` but does not use them. Removing them saved less than 1 KiB on iOS and 13 KiB on Android, so this PR does not change them. ## Not done yet - `url` brings in the Unicode IDNA tables. Pinning `idna_adapter` to its ASCII-only version can remove part of this cost, but it changes how non-ASCII hostnames parse. I did not measure it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
livekit-uniffi0.1.10 release failed both size gates (run):ios-arm64framework binary)arm64-v8a.so)These are two different failures.
iOS had a stale budget. Data streams v2 (#1286) measured the arm64-v8a slice and bumped
ANDROID_SIZE_LIMIT_BYTESfrom 1280 KiB to 1536 KiB, but leftSPM_SIZE_LIMIT_BYTESuntouched at 1152 KiB. The same async foreign-trait machinery landed in the iOS slice too — Android's new budget absorbed it and iOS's did not, so the iOS limit had been a week stale by the time the release cut. The 281 KiB overage is that change arriving against an unbumped budget, not a new regression.Android was ordinary creep, missing by 8 KiB.
Both limits are now re-baselined on the measured 0.1.10 sizes with 10% headroom, rounded up to a 64 KiB boundary, and each comment records the measurement it came from so the next bump has a baseline to reason from.
Worth a follow-up
The reason a forgotten bump stayed invisible for a week is that these gates only ever run at release time:
uniffi-packages.ymltriggers onrelease: [published]/workflow_dispatch, anduniffi-swift.yml/uniffi-android.ymlareworkflow_call-only. No PR executesswift-check-size, so a stale budget surfaces only once a release tag is already cut. Moving the gates earlier isn't free — it means building the xcframework and AAR on PRs touchinglivekit-uniffi(~8 min each in the release run), so it wants a path filter rather than running repo-wide. Left out of this patch deliberately.