Skip to content

feat(capi): libotio for iOS and tvOS as an XCFramework, and static musl Linux libraries - #141

Merged
jhodges10 merged 6 commits into
mainfrom
claude/project-thread-uf4jtq
Nov 13, 2026
Merged

jhodges10 merged 6 commits into
mainfrom
claude/project-thread-uf4jtq

Conversation

@jhodges10

@jhodges10 jhodges10 commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Jeff Hodges · project thread

Closes #140

What

Apple. scripts/build-xcframework.sh builds libotio (default features, so ext-sync and ext-ori) for aarch64-apple-ios, aarch64-apple-ios-sim, aarch64-apple-tvos, aarch64-apple-tvos-sim and a universal macOS slice, and packages them as libotio.xcframework with the C headers (no module map, so it does not collide with the package's own COtio). tvOS is tier 2 on stable Rust now, so no nightly or build-std. iOS/tvOS are built for 13.0; the arm64 simulators for 14.0, Rust's floor.

Swift SDK (via otio-sdk-gen): when sdk/swift/lib/libotio.xcframework exists, Package.swift adds it as a binary target and links it on Apple platforms; otherwise it links libotio by name as before. The library link moved out of the module map into Package.swift so the two paths don't both ask for -lotio. Declares iOS 13 / tvOS 13 / macOS 10.13, and links iconv/CoreFoundation/Security on iOS and tvOS too.

Linux. x86_64-unknown-linux-musl and aarch64-unknown-linux-musl static libraries. musl rather than glibc because Furnace ships on distroless/static (no C library); a cgo binary over a musl libotio.a links fully -static and runs there, while glibc cannot be linked statically and would force a distroless/base image. The existing -linux-gnu libraries stay.

CI (ci.yml, selected as before):

  • apple (with the Swift SDK): builds the XCFramework, swift test on macOS through it, xcodebuild build for iOS and tvOS devices, and the full test suite on the iOS and tvOS simulators.
  • linux-static (whenever the core library builds), x86_64 and arm64: the Go SDK suite built -static on Alpine and run on distroless/static-debian12:nonroot.

Release (release-sdks.yml, nothing tagged or published here): two musl rows in library, and an xcframework job that builds it with LTO, builds the Swift package for all four iOS/tvOS destinations, zips it with ditto and prints the SwiftPM checksum. package-release.sh takes an optional extra-assets directory so the zip lands in SHA256SUMS.

Zig on musl. The Zig package already finds x86_64-linux-musl / aarch64-linux-musl under the names Zig uses, so -Dtarget=x86_64-linux-musl gives one static binary. The Zig SDK's tests run against both musl libraries in linux-static and in the release.

Rust 1.100 fallout (stable moved to 1.100 on 2026-11-09, so main would hit these on its next run):

  • The C ABI test looked for libotio beside the test binary, which 1.100 moved from target/<profile>/deps to target/<profile>/build/<crate>/<hash>/out. It now takes the first directory above the binary that holds a libotio.
  • Rust's Windows std now calls WaitOnAddress/WakeByAddress* directly. The Zig SDK links synchronization on MSVC and api-ms-win-core-synch-l1-2-0 on MinGW, since Zig's MinGW has no synchronization.

Verified here

  • All six Apple targets and both musl targets cross-build from Linux (every dependency is pure Rust).
  • Go SDK suite passes as one static binary against the musl library, and passes again inside distroless/static-debian12:nonroot, Furnace's base image.
  • Swift SDK suite (61 tests) passes on Linux in swift:5.10-jammy with the new manifest.
  • otio-sdk-gen --check, cargo fmt, select-jobs.sh --self-test, package-release.sh dry run with an extra asset.

The XCFramework creation, the iOS/tvOS builds and the simulator runs need a Mac, so this PR's apple job is their first run.

Docs

docs/ci.md, docs/releasing.md, the Swift, Go and C language pages on the site, and the generated Swift README.


Generated by Claude Code


<a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1797141723&installation_model_id=434640&pr_number=141&ref=codesmith_pr_footer&repository=alchemist-editor%2Fotio-rust&return_to=https%3A%2F%2Fgithub.com%2Falchemist-editor%2Fotio-rust%2Fpull%2F141&signature=9465821a10cf26047c78210600846815e890035603a959979e429c5507d2eefe"&gt;&lt;picture&gt;&lt;source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"&gt;&lt;source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"&gt;&lt;img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png" width="190" height="28"&gt;
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Generated by Claude Code

…sl Linux libraries

scripts/build-xcframework.sh builds libotio, with ext-sync and ext-ori, for
macOS (arm64 + x86_64), iOS, the iOS simulator, tvOS and the tvOS simulator
and packages it as libotio.xcframework. All are tier 2 Rust targets, so
stable Rust is enough. The Swift package links the XCFramework whenever it
is in sdk/swift/lib, through a binary target; the module map no longer
links by name, Package.swift does.

The release adds x86_64/aarch64-linux-musl static libraries and the
XCFramework zip. CI gains `apple` (Swift tests on the iOS and tvOS
simulators against the XCFramework) and `linux-static` (the Go SDK suite
as one -static binary on distroless/static, Furnace's base image).

Refs #140

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ezp5TWoWAEM8QpUfdwqYGP
@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
otio-rust-docs Ready Ready Preview Nov 13, 2026 6:28am UTC

Request Review

Rust 1.100 (2026-11-09) moved test binaries from target/<profile>/deps to
target/<profile>/build/<crate>/<hash>/out, so the C ABI test looked for
libotio in the wrong directory and failed on every runner, main included
once its toolchain updates. Look in the first directory above the test
binary that holds a libotio, which is the profile directory under both
layouts.

Refs #140

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ezp5TWoWAEM8QpUfdwqYGP
Rust 1.100 (2026-11-09) uses WaitOnAddress and WakeByAddress* directly,
and `rustc --print native-static-libs` now lists synchronization.lib for
both Windows ABIs, so the Zig SDK's Windows link failed with three
undefined symbols.

Refs #140

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ezp5TWoWAEM8QpUfdwqYGP
Zig links a -linux-musl target statically with its own musl, and the
release's Zig package already carries these libraries under the directory
names it looks in. Passes locally for x86_64-linux-musl (52/52).

Refs #140

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ezp5TWoWAEM8QpUfdwqYGP
Refs #140

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ezp5TWoWAEM8QpUfdwqYGP
Zig's MinGW has no synchronization library, so the release's
x86_64-windows-gnu smoke failed to link. The same functions are exported
by api-ms-win-core-synch-l1-2-0, which it does ship. MSVC keeps
synchronization.lib. Linked locally for x86_64-windows-gnu against a Rust
1.100 gnullvm libotio.

Refs #140

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ezp5TWoWAEM8QpUfdwqYGP
@jhodges10
jhodges10 marked this pull request as ready for review November 13, 2026 06:41
@jhodges10
jhodges10 merged commit 846516e into main Nov 13, 2026
57 checks passed
@jhodges10
jhodges10 deleted the claude/project-thread-uf4jtq branch November 13, 2026 06:42
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T06:42:37.915791Z 6669046 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jhodges10 jhodges10 mentioned this pull request Nov 13, 2026
jhodges10 added a commit that referenced this pull request Nov 13, 2026
<!-- claude-projects-attribution: {"github_login":"jhodges10"} -->
_Requested by **Jeff Hodges** · [project
thread](https://claude.ai/code/project/chan_0167MnVo13oFyTSC8Du9FZyi?thread=cmsg_0167MnVo13oFyTSC8Du9FZyiQuAhwBQjkM53J74HybMCv7)_

Bumps the workspace to 0.2.0 for a GitHub release (`v0.2.0`,
`release-sdks.yml`), per `docs/releasing.md`. `v0.1.0` was cut on
2026-09-23; since then there are 144 commits on main, among them the
XCFramework for iOS/tvOS and the static musl Linux libraries (#141).

- `[workspace.package] version` and every path dependency's `version = `
requirement (a `0.1.0` requirement would not match a `0.2.0` crate).
- Regenerated: `sdk/api.json`, `sdk/zig/build.zig.zon` (the release
refuses a mismatch with Cargo.toml).
- The `zig fetch` URL in `sdk/zig/README.md` and the site's Zig page.

Not changed: the TypeScript package's npm version (`npm-v*` tags,
released separately).

Once merged, tag the merge commit `v0.2.0` and push it.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01Ezp5TWoWAEM8QpUfdwqYGP)_

<!-- codesmith:footer -->
---
<a
href="https://backend.blacksmith.sh/track/enable-autofix?expires=1797144722&installation_model_id=434640&pr_number=142&ref=codesmith_pr_footer&repository=alchemist-editor%2Fotio-rust&return_to=https%3A%2F%2Fgithub.com%2Falchemist-editor%2Fotio-rust%2Fpull%2F142&signature=9fe4816daea1d8a33abe25b41ba099229d9200321fd4c8efa232cc9d12244936"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img
alt="Autofix with [code]smith"
src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png"
width="190" height="28"></picture></a>
<sup><a
href="https://app.blacksmith.sh/alchemist-editor/codesmith/otio-rust/pr/142?autoLogin=true&ref=codesmith_pr_footer">Open
in [code]smith</a> · Need help on this PR? Tag
<code>@codesmith-bot</code> with what you need.</sup>

<!-- codesmith:autofix:disabled -->
<!-- /codesmith:footer -->

This branch was successfully deployed

1 active deployment
Preview — 66690467 Deployed Nov 13, 2026 by vercel[bot]
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.

libotio for iOS, tvOS (XCFramework) and static Linux (musl)

2 participants