@@ -66,13 +66,13 @@ echo "▸ Building for aarch64-apple-ios"
66
66
CFLAGS_aarch64_apple_ios=" -target aarch64-apple-ios" \
67
67
$cargo_build --target aarch64-apple-ios --locked --release
68
68
69
- # echo "▸ Building for aarch64-apple-visionos-sim"
70
- # CFLAGS_aarch64_apple_visionos="-target aarch64-apple-visionos-sim" \
71
- # $cargo_build_nightly_with_std --target aarch64-apple-visionos-sim --locked --release
69
+ echo " ▸ Building for aarch64-apple-visionos-sim"
70
+ CFLAGS_aarch64_apple_visionos=" -target aarch64-apple-visionos-sim" \
71
+ $cargo_build_nightly_with_std --target aarch64-apple-visionos-sim --locked --release
72
72
73
- # echo "▸ Building for aarch64-apple-visionos"
74
- # CFLAGS_aarch64_apple_visionos="-target aarch64-apple-visionos" \
75
- # $cargo_build_nightly_with_std --target aarch64-apple-visionos --locked --release
73
+ echo " ▸ Building for aarch64-apple-visionos"
74
+ CFLAGS_aarch64_apple_visionos=" -target aarch64-apple-visionos" \
75
+ $cargo_build_nightly_with_std --target aarch64-apple-visionos --locked --release
76
76
77
77
echo " ▸ Building for aarch64-apple-darwin"
78
78
CFLAGS_aarch64_apple_darwin=" -target aarch64-apple-darwin" \
@@ -110,11 +110,11 @@ lipo -create \
110
110
" ${BUILD_FOLDER} /aarch64-apple-ios-sim/release/${LIB_NAME} " \
111
111
-output " ${BUILD_FOLDER} /ios-simulator/release/${LIB_NAME} "
112
112
113
- # echo "▸ arm simulator static libraries into a static binary"
114
- # mkdir -p "${BUILD_FOLDER}/visionos-simulator/release"
115
- # lipo -create \
116
- # "${BUILD_FOLDER}/aarch64-apple-visionos-sim/release/${LIB_NAME}" \
117
- # -output "${BUILD_FOLDER}/visionos-simulator/release/${LIB_NAME}"
113
+ echo " ▸ arm simulator static libraries into a static binary"
114
+ mkdir -p " ${BUILD_FOLDER} /visionos-simulator/release"
115
+ lipo -create \
116
+ " ${BUILD_FOLDER} /aarch64-apple-visionos-sim/release/${LIB_NAME} " \
117
+ -output " ${BUILD_FOLDER} /visionos-simulator/release/${LIB_NAME} "
118
118
119
119
echo " ▸ Lipo (merge) x86 and arm macOS static libraries into a fat static binary"
120
120
mkdir -p " ${BUILD_FOLDER} /apple-darwin/release"
@@ -131,11 +131,12 @@ lipo -create \
131
131
-output " ${BUILD_FOLDER} /apple-macabi/release/${LIB_NAME} "
132
132
133
133
134
- # -library "$BUILD_FOLDER/aarch64-apple-visionos/release/$LIB_NAME" \
135
- # -headers "${BUILD_FOLDER}/includes" \
136
- # -library "${BUILD_FOLDER}/visionos-simulator/release/${LIB_NAME}" \
137
- # -headers "${BUILD_FOLDER}/includes" \
134
+
138
135
xcodebuild -create-xcframework \
136
+ -library " $BUILD_FOLDER /aarch64-apple-visionos/release/$LIB_NAME " \
137
+ -headers " ${BUILD_FOLDER} /includes" \
138
+ -library " ${BUILD_FOLDER} /visionos-simulator/release/${LIB_NAME} " \
139
+ -headers " ${BUILD_FOLDER} /includes" \
139
140
-library " $BUILD_FOLDER /aarch64-apple-ios/release/$LIB_NAME " \
140
141
-headers " ${BUILD_FOLDER} /includes" \
141
142
-library " ${BUILD_FOLDER} /ios-simulator/release/${LIB_NAME} " \
@@ -151,57 +152,3 @@ ditto -c -k --sequesterRsrc --keepParent "$XCFRAMEWORK_FOLDER" "$XCFRAMEWORK_FOL
151
152
152
153
echo " ▸ Compute checksum"
153
154
openssl dgst -sha256 " $XCFRAMEWORK_FOLDER .zip"
154
-
155
-
156
- # ############
157
- # rm -rf gen-swift
158
- # mkdir -p gen-swift/includes
159
- # cd loro-rs
160
- # cargo run --features=cli --bin uniffi-bindgen generate src/loro.udl --language swift --out-dir ../gen-swift
161
-
162
- # echo "Building x86_64-apple-ios"
163
- # CFLAGS_x86_64_apple_ios="-target x86_64-apple-ios" \
164
- # cargo build --target x86_64-apple-ios --locked --release
165
-
166
- # echo "Building aarch64-apple-ios-sim"
167
- # CFLAGS_x86_64_apple_ios="-aarch64-apple-ios-sim" \
168
- # cargo build --target aarch64-apple-ios-sim --locked --release
169
-
170
- # echo "Building aarch64-apple-ios"
171
- # CFLAGS_x86_64_apple_ios="-target aarch64-apple-ios" \
172
- # cargo build --target aarch64-apple-ios --locked --release
173
-
174
- # echo "Building aarch64-apple-visionos-sim"
175
- # CFLAGS_x86_64_apple_ios="-target aarch64-apple-visionos-sim" \
176
- # cargo build --target aarch64-apple-visionos-sim --locked --release
177
-
178
- # echo "Building aarch64-apple-visionos"
179
- # CFLAGS_x86_64_apple_ios="-target aarch64-apple-visionos" \
180
- # cargo build --target aarch64-apple-visionos --locked --release
181
-
182
- # echo "Building aarch64-apple-darwin"
183
- # CFLAGS_x86_64_apple_ios="-target aarch64-apple-darwin" \
184
- # cargo build --target aarch64-apple-darwin --locked --release
185
-
186
- # echo "Building x86_64-apple-darwin"
187
- # CFLAGS_x86_64_apple_ios="-target x86_64-apple-darwin" \
188
- # cargo build --target x86_64-apple-darwin --locked --release
189
-
190
- # echo "Building aarch64-apple-ios-macabi"
191
- # CFLAGS_x86_64_apple_ios="-target aarch64-apple-ios-macabi" \
192
- # cargo build --target aarch64-apple-ios-macabi --locked --release
193
-
194
- # echo "Building x86_64-apple-ios-macabi"
195
- # CFLAGS_x86_64_apple_ios="-target x86_64-apple-ios-macabi" \
196
- # cargo build --target x86_64-apple-ios-macabi --locked --release
197
-
198
-
199
-
200
- # cd ..
201
- # mv gen-swift/loroFFI.h gen-swift/includes/loroFFI.h
202
- # mv gen-swift/loroFFI.modulemap gen-swift/includes/module.modulemap
203
- # xcodebuild -create-xcframework -library loro-rs/target/release/libloro.a -headers gen-swift/includes -output loroFFI.xcframework
204
- # zip -r loroFFI.xcframework.zip loroFFI.xcframework
205
- # mv gen-swift/loro.swift Sources/Loro/LoroFFI.swift
206
- # sh scripts/refine_trait.sh
207
- # rm -rf gen-swift loroFFI.xcframework
0 commit comments