Skip to content

Commit cbe4f04

Browse files
committed
chore: optimize binary size and bump to 0.17.5
- Add release profile with strip and codegen-units=1 - Remove unused clap_derive dependency - Remove x86_64-apple-ios target (Intel Mac simulator)
1 parent 9fb80b3 commit cbe4f04

File tree

4 files changed

+10
-23
lines changed

4 files changed

+10
-23
lines changed

Cargo.lock

Lines changed: 2 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cooklang"
3-
version = "0.17.4"
3+
version = "0.17.5"
44
edition = "2021"
55
authors = ["Zheoni <zheoni@outlook.es>"]
66
description = "Cooklang parser with opt-in extensions"
@@ -61,3 +61,7 @@ harness = false
6161

6262
[workspace]
6363
members = [".", "typescript", "bindings", "fuzz"]
64+
65+
[profile.release]
66+
codegen-units = 1
67+
strip = true

bindings/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cooklang-bindings"
3-
version = "0.17.4"
3+
version = "0.17.5"
44
edition = "2021"
55
authors = ["dubadub <dubovskoy.a@gmail.com>"]
66
description = "Cooklang Uniffi bindings"
@@ -13,7 +13,6 @@ readme = "README.md"
1313
anyhow = "1.0"
1414
cooklang = { path = "..", default-features = false, features = ["aisle"] }
1515
uniffi = "0.28.1"
16-
clap_derive = { version = "4.0.0-rc.1" }
1716

1817
[lib]
1918
crate-type = ["cdylib", "staticlib"]

bindings/build-swift.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ WRAPPER_PATH="../swift/Sources/CooklangParser"
1919

2020
AARCH64_APPLE_IOS_PATH="../target/aarch64-apple-ios/release"
2121
AARCH64_APPLE_IOS_SIM_PATH="../target/aarch64-apple-ios-sim/release"
22-
X86_64_APPLE_IOS_PATH="../target/x86_64-apple-ios/release"
2322
AARCH64_APPLE_DARWIN_PATH="../target/aarch64-apple-darwin/release"
2423
X86_64_APPLE_DARWIN_PATH="../target/x86_64-apple-darwin/release"
2524

26-
targets=("aarch64-apple-ios" "aarch64-apple-ios-sim" "x86_64-apple-ios" "aarch64-apple-darwin" "x86_64-apple-darwin")
25+
targets=("aarch64-apple-ios" "aarch64-apple-ios-sim" "aarch64-apple-darwin" "x86_64-apple-darwin")
2726

2827
# Build for all targets
2928
for target in "${targets[@]}"; do
@@ -47,9 +46,7 @@ cargo run --features="uniffi/cli" \
4746

4847
# Merge libraries with lipo
4948
echo "Merging libraries with lipo..."
50-
lipo -create $AARCH64_APPLE_IOS_SIM_PATH/$LIBRARY_NAME \
51-
$X86_64_APPLE_IOS_PATH/$LIBRARY_NAME \
52-
-output $OUT_PATH/sim-$LIBRARY_NAME
49+
cp $AARCH64_APPLE_IOS_SIM_PATH/$LIBRARY_NAME $OUT_PATH/sim-$LIBRARY_NAME
5350
lipo -create $AARCH64_APPLE_DARWIN_PATH/$LIBRARY_NAME \
5451
$X86_64_APPLE_DARWIN_PATH/$LIBRARY_NAME \
5552
-output $OUT_PATH/macos-$LIBRARY_NAME

0 commit comments

Comments
 (0)