Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# CHANGELOG

## 1.0.18

The evaluator is unchanged from 1.0.17.

### Enhancements

- The iOS package adds tvOS, and its watchOS build now runs on Apple Watch Series 9 and later. Before, watch apps failed to link because the watchOS build only had the architecture of older watches.

## 1.0.17

The evaluator is unchanged from 1.0.16.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cel-eval"
version = "1.0.17"
version = "1.0.18"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.htmlž
Expand Down
43 changes: 39 additions & 4 deletions build_ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,27 @@ cargo +nightly build -Zbuild-std=std,core,alloc,panic_unwind --target=aarch64-ap
SDKROOT="$(xcrun --sdk xrsimulator --show-sdk-path)" \
cargo +nightly build -Zbuild-std=std,core,alloc,panic_unwind --target=aarch64-apple-visionos-sim --lib --release

# For watchOS device
# For watchOS device. Watches up to Series 8 run arm64_32, newer ones arm64,
# and Xcode builds watch apps for both.
SDKROOT="$(xcrun --sdk watchos --show-sdk-path)" \
cargo +nightly build -Zbuild-std=std,core,alloc,panic_unwind --target=arm64_32-apple-watchos --lib --release
SDKROOT="$(xcrun --sdk watchos --show-sdk-path)" \
cargo +nightly build -Zbuild-std=std,core,alloc,panic_unwind --target=aarch64-apple-watchos --lib --release
# For watchOS simulator
SDKROOT="$(xcrun --sdk watchsimulator --show-sdk-path)" \
cargo +nightly build -Zbuild-std=std,core,alloc,panic_unwind --target=aarch64-apple-watchos-sim --lib --release
SDKROOT="$(xcrun --sdk watchsimulator --show-sdk-path)" \
cargo +nightly build -Zbuild-std=std,core,alloc,panic_unwind --target=x86_64-apple-watchos-sim --lib --release

# For tvOS device
SDKROOT="$(xcrun --sdk appletvos --show-sdk-path)" \
cargo +nightly build -Zbuild-std=std,core,alloc,panic_unwind --target=aarch64-apple-tvos --lib --release
# For tvOS simulator
SDKROOT="$(xcrun --sdk appletvsimulator --show-sdk-path)" \
cargo +nightly build -Zbuild-std=std,core,alloc,panic_unwind --target=aarch64-apple-tvos-sim --lib --release
SDKROOT="$(xcrun --sdk appletvsimulator --show-sdk-path)" \
cargo +nightly build -Zbuild-std=std,core,alloc,panic_unwind --target=x86_64-apple-tvos --lib --release


# Rename *.modulemap to module.modulemap
mv ./target/ios/celFFI.modulemap ./target/ios/module.modulemap
Expand All @@ -121,6 +133,7 @@ mkdir -p ./target/ios/release/
mkdir -p ./target/macos/release/
mkdir -p ./target/visionos/release/
mkdir -p ./target/watchos/release/
mkdir -p ./target/tvos/release/

# Clean up previous build artifacts
rm -rf ./target/xcframeworks
Expand All @@ -134,6 +147,8 @@ mkdir -p ./target/xcframeworks/headers/visionos-simulator/celFFI
mkdir -p ./target/xcframeworks/headers/visionos-device/celFFI
mkdir -p ./target/xcframeworks/headers/watchos-simulator/celFFI
mkdir -p ./target/xcframeworks/headers/watchos-device/celFFI
mkdir -p ./target/xcframeworks/headers/tvos-simulator/celFFI
mkdir -p ./target/xcframeworks/headers/tvos-device/celFFI

# Copy headers into celFFI subdirectory
cp -R ./target/ios/* ./target/xcframeworks/headers/ios-simulator/celFFI/
Expand All @@ -144,6 +159,8 @@ cp -R ./target/ios/* ./target/xcframeworks/headers/visionos-simulator/celFFI/
cp -R ./target/ios/* ./target/xcframeworks/headers/visionos-device/celFFI/
cp -R ./target/ios/* ./target/xcframeworks/headers/watchos-simulator/celFFI/
cp -R ./target/ios/* ./target/xcframeworks/headers/watchos-device/celFFI/
cp -R ./target/ios/* ./target/xcframeworks/headers/tvos-simulator/celFFI/
cp -R ./target/ios/* ./target/xcframeworks/headers/tvos-device/celFFI/

# iOS Simulator (combined arm64 and x86_64)
echo "Preparing iOS Simulator library (universal binary)"
Expand Down Expand Up @@ -195,12 +212,28 @@ lipo -create ./target/aarch64-apple-watchos-sim/release/libcel_eval.a \
-output ./target/xcframeworks/watchos-simulator/libcel.a
strip -x ./target/xcframeworks/watchos-simulator/libcel.a

# watchOS Device (arm64)
echo "Preparing watchOS Device library"
# watchOS Device (combined arm64_32 and arm64)
echo "Preparing watchOS Device library (universal binary)"
mkdir -p ./target/xcframeworks/watchos-device
cp ./target/arm64_32-apple-watchos/release/libcel_eval.a ./target/xcframeworks/watchos-device/libcel.a
lipo -create ./target/arm64_32-apple-watchos/release/libcel_eval.a \
./target/aarch64-apple-watchos/release/libcel_eval.a \
-output ./target/xcframeworks/watchos-device/libcel.a
strip -x ./target/xcframeworks/watchos-device/libcel.a

# tvOS Simulator (combined arm64 and x86_64)
echo "Preparing tvOS Simulator library (universal binary)"
mkdir -p ./target/xcframeworks/tvos-simulator
lipo -create ./target/aarch64-apple-tvos-sim/release/libcel_eval.a \
./target/x86_64-apple-tvos/release/libcel_eval.a \
-output ./target/xcframeworks/tvos-simulator/libcel.a
strip -x ./target/xcframeworks/tvos-simulator/libcel.a

# tvOS Device (arm64)
echo "Preparing tvOS Device library"
mkdir -p ./target/xcframeworks/tvos-device
cp ./target/aarch64-apple-tvos/release/libcel_eval.a ./target/xcframeworks/tvos-device/libcel.a
strip -x ./target/xcframeworks/tvos-device/libcel.a

echo "Building XCFramework"
xcodebuild -create-xcframework \
-library ./target/xcframeworks/ios-simulator/libcel.a -headers ./target/xcframeworks/headers/ios-simulator \
Expand All @@ -211,6 +244,8 @@ xcodebuild -create-xcframework \
-library ./target/xcframeworks/visionos-device/libcel.a -headers ./target/xcframeworks/headers/visionos-device \
-library ./target/xcframeworks/watchos-simulator/libcel.a -headers ./target/xcframeworks/headers/watchos-simulator \
-library ./target/xcframeworks/watchos-device/libcel.a -headers ./target/xcframeworks/headers/watchos-device \
-library ./target/xcframeworks/tvos-simulator/libcel.a -headers ./target/xcframeworks/headers/tvos-simulator \
-library ./target/xcframeworks/tvos-device/libcel.a -headers ./target/xcframeworks/headers/tvos-device \
-output ./target/xcframeworks/libcel.xcframework

echo "XCFramework built at ./target/xcframeworks/libcel.xcframework"
Expand Down
2 changes: 1 addition & 1 deletion wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "superscript"
version = "1.0.17"
version = "1.0.18"
edition = "2021"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion wasm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@superwall/superscript",
"version": "1.0.17",
"version": "1.0.18",
"repository": {
"type": "git",
"url": "git+https://github.com/superwall/superscript.git",
Expand Down
Loading