diff --git a/build/.tasks.yml b/build/.tasks.yml index 957941323..57efc6464 100644 --- a/build/.tasks.yml +++ b/build/.tasks.yml @@ -26,7 +26,7 @@ tasks: GOBLEY_ROOT: target/gobley cmds: - cargo install --locked --git {{.GOBLEY_GIT}} --rev {{.GOBLEY_REV}} --root {{.GOBLEY_ROOT}} --bin gobley-uniffi-bindgen gobley-uniffi-bindgen - - "{{.GOBLEY_ROOT}}/bin/gobley-uniffi-bindgen --config ./libs/gl-sdk/uniffi.kotlin-multiplatform.toml --library ./target/aarch64-linux-android/debug/libglsdk.a --out-dir target/release/kotlin-multiplatform" + - "{{.GOBLEY_ROOT}}/bin/gobley-uniffi-bindgen --config ./libs/gl-sdk/uniffi.kotlin-multiplatform.toml --library ./target/aarch64-linux-android/release/libglsdk.a --out-dir target/release/kotlin-multiplatform" - cp -a ./target/release/kotlin-multiplatform/* libs/gl-sdk-android/lib/src/ - mkdir -p libs/gl-sdk-android/lib/src/lib/ios-arm64 - mkdir -p libs/gl-sdk-android/lib/src/lib/ios-simulator-arm64 @@ -52,8 +52,12 @@ tasks: vars: ABI: '{{index .MATCH 0}}' ARCH: '{{index .MATCH 1}}' + # The workspace's release profile aborts on panic. The SDK libraries unwind instead, so UniFFI + # hands a Rust panic to Kotlin or Swift as an exception rather than aborting the app. + env: &sdk_env + CARGO_PROFILE_RELEASE_PANIC: unwind cmds: - - cargo ndk -t {{.ARCH}}-linux-{{.ABI}} -o target/release/android/jniLibs build -p gl-sdk + - cargo ndk -t {{.ARCH}}-linux-{{.ABI}} -o target/release/android/jniLibs build --release -p gl-sdk ios: deps: @@ -70,11 +74,13 @@ tasks: ios-apple-*: vars: ARCH: '{{ index .MATCH 0 }}' + env: *sdk_env cmds: - IPHONEOS_DEPLOYMENT_TARGET=12.0 MACOSX_DEPLOYMENT_TARGET=11.0 cargo build --release --target {{.ARCH}}-apple-ios -p gl-sdk ios-sim-apple-*: vars: ARCH: '{{ index .MATCH 0 }}' + env: *sdk_env cmds: - IPHONEOS_DEPLOYMENT_TARGET=12.0 MACOSX_DEPLOYMENT_TARGET=11.0 cargo build --release --target {{.ARCH}}-apple-ios-sim -p gl-sdk diff --git a/libs/gl-sdk/CHANGELOG.md b/libs/gl-sdk/CHANGELOG.md index 55d68b47a..eb98cc3bb 100644 --- a/libs/gl-sdk/CHANGELOG.md +++ b/libs/gl-sdk/CHANGELOG.md @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## Unreleased +### Changed + +- iOS (Kotlin and Swift): a Rust panic in the SDK reaches the app as an exception instead of aborting it, as it already does on Android. The Android and iOS libraries unwind on panic, unlike the workspace's release profile. + +### Fixed + +- Android: the native libraries are built in release mode. They were unoptimized debug builds with debug assertions, and the `arm64-v8a` `libglsdk.so` shrinks from 29.9 MB to 11.0 MB. + ## [0.5.0] - 2026-10-12 ### Added