Static and dynamic macOS/iOS XCFramework packaging for upstream librime.
This repository builds a binary distribution so Xcode and SwiftPM consumers do not need to compile librime and its C++ dependency graph themselves.
A release contains:
librime-static.xcframework.ziplibrime-dynamic.xcframework.zipLICENSE.txtTHIRD_PARTY_NOTICES.mdthird-party-notices.zipbuild-metadata.json
The static XCFramework contains macOS arm64/x86_64, iOS device arm64, and iOS simulator arm64/x86_64 library slices. The dynamic XCFramework contains RimeDynamic.framework slices for macOS, iOS device, and iOS simulator. Both include the public librime C API headers. GitHub Releases exposes the SHA-256 digest for each uploaded asset.
Release tags contain a generated Package.swift with binary targets that point at the matching GitHub Release assets.
.package(url: "https://github.com/ghostflyby/librime-xcframework.git", from: "1.16.1-pack.1")Use product RimeStatic for the static XCFramework and RimeDynamic for the dynamic framework XCFramework. These products expose the RimeStatic and RimeDynamic modules directly.
Use product RimeSystem to bind against a system-provided or user-replaced librime implementation. RimeSystem uses pkg-config rime for compiler and linker flags, does not force a specific library name in its module map, and exposes the RimeSystem module.
Prerequisites:
- macOS with Xcode command line tools
- CMake and Ninja
- vcpkg, with
VCPKG_ROOTpointing at the vcpkg checkout - upstream
librimesource at../librimeorvendor/librime
Build and package:
VCPKG_ROOT=/path/to/vcpkg scripts/build-all.shBuild one slice:
VCPKG_ROOT=/path/to/vcpkg scripts/build-one-arch.sh arm64
VCPKG_ROOT=/path/to/vcpkg scripts/build-one-arch.sh x86_64Package existing slice outputs:
scripts/package-xcframework.shOutputs are written to out/ and dist/.
Package versions use:
<upstream-version>-pack.<packaging-revision>
In the build workflow, leaving upstream_ref empty builds the latest upstream release tag. Leaving packaging_version empty derives the release tag from the upstream version and packaging_revision; if packaging_revision is also empty, the workflow uses the next available pack revision.
Example:
1.16.1-pack.1
The packaging wrapper code in this repository is licensed under the BSD
3-Clause License. Binary release artifacts include upstream librime, which is
also BSD 3-Clause licensed, and may include statically linked third-party
dependencies resolved by vcpkg.
Keep LICENSE.txt, THIRD_PARTY_NOTICES.md, and third-party-notices.zip
with redistributed binary artifacts.