Skip to content

livekit-ffi: re-baseline the iOS and Android size budgets - #1623

Merged
lukasIO merged 1 commit into
mainfrom
lukas/ffi-size-limits
Nov 4, 2026
Merged

lukasIO merged 1 commit into
mainfrom
lukas/ffi-size-limits

Conversation

@lukasIO

@lukasIO lukasIO commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

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

The 0.13.3 packages failed both size gates once the signaling client
joined core-modules: iOS 1926 KiB against 1600, Android 2145 KiB against
1728. Measured locally, signaling accounts for ~443 KiB (iOS) and ~554 KiB
(Android) of that; everything else since 0.13.2 adds ~35 KiB.

Both limits are re-baselined with 10% headroom rounded up to 64 KiB, as in
#1414: iOS 2176 KiB, Android 2368 KiB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lukasIO lukasIO self-assigned this Nov 2, 2026
@lukasIO
lukasIO requested a review from ladvoc as a code owner November 2, 2026 10:49
@lukasIO
lukasIO requested review from davidliu and pblazej November 2, 2026 10:49
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Changeset ✓

This PR includes a changeset covering all affected packages:

Package Bump
livekit-ffi patch

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@pblazej

pblazej commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

fyi @xianshijing-lk we're slowly exceeding the recent native (swift) cuts ✂️

@pblazej pblazej left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I'm completely fine with that until we're all aware of the increase cc @davidliu

@lukasIO

lukasIO commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

#1631 decreased the overall payload size, however it's still about the old limit, will merge this regardless.

@lukasIO
lukasIO merged commit 34d0cc7 into main Nov 4, 2026
34 checks passed
@lukasIO
lukasIO deleted the lukas/ffi-size-limits branch November 4, 2026 18:26
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.

2 participants