Skip to content

ghostflyby/librime-xcframework

Repository files navigation

librime XCFramework

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.

Artifacts

A release contains:

  • librime-static.xcframework.zip
  • librime-dynamic.xcframework.zip
  • LICENSE.txt
  • THIRD_PARTY_NOTICES.md
  • third-party-notices.zip
  • build-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.

Swift Package

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.

Local Build

Prerequisites:

  • macOS with Xcode command line tools
  • CMake and Ninja
  • vcpkg, with VCPKG_ROOT pointing at the vcpkg checkout
  • upstream librime source at ../librime or vendor/librime

Build and package:

VCPKG_ROOT=/path/to/vcpkg scripts/build-all.sh

Build one slice:

VCPKG_ROOT=/path/to/vcpkg scripts/build-one-arch.sh arm64
VCPKG_ROOT=/path/to/vcpkg scripts/build-one-arch.sh x86_64

Package existing slice outputs:

scripts/package-xcframework.sh

Outputs are written to out/ and dist/.

Versioning

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

License

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.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages