Strip DWARF from iOS FFI release archives#1248
Open
drewcrawford wants to merge 1 commit into
Open
Conversation
drewcrawford
force-pushed
the
fix/strip-ios-ffi-dwarf
branch
from
July 17, 2026 17:50
d8df76e to
d200894
Compare
Also set the checkout repository in gen-node-proto.yml to the PR head repository. The job previously fetched the head branch name from the base repository, which fails for any fork-based PR that matches the workflow's path filter (including this one, via .github/**).
drewcrawford
force-pushed
the
fix/strip-ios-ffi-dwarf
branch
from
July 17, 2026 17:55
d200894 to
223989e
Compare
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.
Summary
liblivekit_ffi.aarchives before packaging.ranlib.livekit-ffi.Fixes #1087.
Background
The iOS FFI builds produce static archives, so there is no final dynamic-link step
to discard DWARF information. Although the workspace release profile enables
symbol stripping, that does not remove debug information embedded in every
archive member, including the bundled C/C++ WebRTC objects.
Post-processing the completed archive with Apple's
strip -Shandles the wholeartifact while preserving global symbols required by downstream linkers.
Measured impact
aarch64-apple-iosaarch64-apple-ios-simAcross both published iOS archives, this reduces raw size by 90.28% and
compressed size by 88.23%.
DWARF section size falls to zero. All defined external symbols and all 3,435
archive members are preserved, including
livekit_ffi_request,livekit_ffi_initialize, andlivekit_ffi_drop_handle.Design tradeoffs
Using a Cargo profile setting alone was avoided because it does not reliably
strip debug information from all bundled C/C++ archive members.
Post-build stripping adds roughly 61 seconds to each iOS release matrix job on
my laptop. Faster packaging saves about 12 seconds per artifact, and the
smaller upload and downstream processing costs should offset additional time
outside the build itself.
Testing
liblivekit_ffi.afor:aarch64-apple-iosaarch64-apple-ios-simxcrun strip -Sandxcrun ranlibto both archives.already contains zero DWARF.
cargo fmt --all -- --check, workflow YAML parsing, changeset validation,and
git diff --check.CI note
This PR also adds one line to
gen-node-proto.yml: the checkout step nowsets
repository:to the PR head repository. The job previously fetchedthe head branch name from the base repository, which fails for any
fork-based PR matching the workflow's path filter — including this one,
via
.github/**. Same-repo PRs are unaffected(
head.repo.full_nameequalsgithub.repositorythere).