Skip to content

chore(ios): add static OpenSSL build tooling for Apple platforms - #1068

Merged
boorad merged 1 commit into
mainfrom
chore/openssl-apple-build
Aug 12, 2026
Merged

chore(ios): add static OpenSSL build tooling for Apple platforms#1068
boorad merged 1 commit into
mainfrom
chore/openssl-apple-build

Conversation

@boorad

@boorad boorad commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Build tooling only. Nothing consumes the output yet — no podspec change, no dependency change, no behaviour change. Safe to merge on its own.

Split out from the #1059 fix for one reason: workflow_dispatch is only available for workflows that exist on the default branch, so the workflow has to land on main before it can be run at all.

What's here

scripts/build-openssl-apple.sh — builds static OpenSSL for the seven Apple slices we support (ios, ios-sim, macos, tvos, tvos-sim, xros, xros-sim), renames every global symbol to rnqc_*, demotes the originals to non-external, and packages an xcframework plus a force-include prefix header.

The rename happens at link level (ld -r + -alias_list + -unexported_symbols_list), not through a BoringSSL-style -include prefix header. That distinction matters: a prefix header cannot rewrite .globl _sha256_block_data_order, so every perlasm symbol would stay globally visible and still collide.

.github/workflows/build-openssl-apple.ymlworkflow_dispatch with an OpenSSL version input; builds, creates the openssl-apple-<version> release, and prints the checksum to paste into the podspec.

package.json — scopes release-it's tag lookup to v*. This is a prerequisite, not a drive-by: tagMatch defaults to null, so once an openssl-apple-3.6.2 tag exists on the same history, git describe --tags --abbrev=0 returns it and release-it derives the next package version from it.

Verification

Ran the full script locally — all 7 slices build, and each produced archive has zero unprefixed external symbols and zero dangling aliases:

slice archs leaked dangling
ios-arm64 arm64 0 0
ios sim x86_64 arm64 0 0
macos x86_64 arm64 0 0
tvos-arm64 arm64 0 0
tvos sim x86_64 arm64 0 0
xros-arm64 arm64 0 0
xros sim x86_64 arm64 0 0

Every slice links against a test consumer, and the macOS one executes: SHA-256 and P-256 keygen both run correctly through the renamed symbols.

Two bugs were found and fixed during that verification: ld64 emits an undefined alias for common symbols (needs -fno-common), and an over-eager symbol filter silently dropped 22 legitimate _CONF_*/_armv8_* names.

Not verified

The workflow itself has never run on a GitHub runner — the script is verified, the CI wrapper around it is not.

🤖 Generated with Claude Code

Build tooling only — nothing consumes the output yet. Split out from the
#1059 fix so the workflow lands on main, since workflow_dispatch is only
available for workflows on the default branch.

scripts/build-openssl-apple.sh builds static OpenSSL for the seven Apple
slices QuickCrypto supports, renames every global symbol to rnqc_* and
demotes the originals to non-external, then packages an xcframework. The
rename happens at link level (ld -r + -alias_list + -unexported_symbols_list)
rather than through a -include prefix header, so it also covers perlasm
symbols that the preprocessor cannot reach.

Also scopes release-it's tag lookup to v* — the openssl-apple-* release
tags share history with the npm releases, and tagMatch defaults to null,
so git describe would otherwise derive the next version from them.
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
react-native-quick-crypto Ready Ready Preview Aug 12, 2026 10:03pm

Request Review

@boorad
boorad merged commit 1657c44 into main Aug 12, 2026
3 checks passed
@boorad
boorad deleted the chore/openssl-apple-build branch August 12, 2026 22:09
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.

1 participant