Skip to content

Commit 04f1c57

Browse files
committed
Merge branch 'development'
2 parents 9384f3c + f22a3db commit 04f1c57

35 files changed

Lines changed: 596 additions & 248 deletions

.github/scripts/build-swift-xcframework.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ CHECKSUM_PATH="$DIST_DIR/OndeFramework.checksum.txt"
1313
VERSION_PATH="$DIST_DIR/version.txt"
1414
BINDGEN="$ROOT_DIR/uniffi-bindgen/target/release/uniffi-bindgen"
1515

16+
rm -rf "$FRAMEWORK_DIR" "$ZIP_PATH" "$CHECKSUM_PATH" "$VERSION_PATH"
1617
mkdir -p "$DIST_DIR" "$PACKAGE_DIR/Sources/Onde" "$HEADERS_DIR"
1718

1819
cargo +1.92.0 build --manifest-path uniffi-bindgen/Cargo.toml --release
@@ -75,9 +76,12 @@ printf '%s
7576

7677
VERSION=$(python3 - <<'VER'
7778
from pathlib import Path
78-
import tomllib
79-
cargo = Path('Cargo.toml').read_text().encode()
80-
print(tomllib.loads(cargo.decode())['package']['version'])
79+
import re
80+
cargo = Path('Cargo.toml').read_text()
81+
match = re.search(r'^version\s*=\s*"([^"]+)"', cargo, re.MULTILINE)
82+
if not match:
83+
raise SystemExit('Could not parse package.version from Cargo.toml')
84+
print(match.group(1))
8185
VER
8286
)
8387
printf '%s

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,46 @@ permissions:
1313
contents: read
1414

1515
jobs:
16+
# ── Dart / Flutter SDK validation ────────────────────────────────────────
17+
dart-sdk:
18+
name: Dart SDK (Flutter)
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v6
22+
- uses: subosito/flutter-action@v2
23+
with:
24+
flutter-version-file: sdk/dart/.flutter-version
25+
channel: stable
26+
cache: true
27+
- name: Install Dart dependencies
28+
working-directory: sdk/dart
29+
run: flutter pub get
30+
- name: Analyze Dart package
31+
working-directory: sdk/dart
32+
run: flutter analyze --no-fatal-infos
33+
- name: Analyze score-sensitive generated Dart files
34+
working-directory: sdk/dart
35+
run: |
36+
flutter analyze lib/src/frb_generated.dart/api.dart
37+
flutter analyze lib/src/frb_generated.dart/frb_generated.dart
38+
flutter analyze lib/src/frb_generated.dart/frb_generated.io.dart
39+
- name: Verify Apple SwiftPM manifests exist
40+
working-directory: sdk/dart
41+
run: |
42+
test -f ios/onde_inference/Package.swift
43+
test -f ios/onde_inference/Sources/onde_inference/OndeInferencePlugin.swift
44+
test -f macos/onde_inference/Package.swift
45+
test -f macos/onde_inference/Sources/onde_inference/OndeInferencePlugin.swift
46+
- name: Run Dart package tests
47+
working-directory: sdk/dart
48+
run: flutter test
49+
- name: Restore generated files modified by flutter pub get
50+
working-directory: sdk/dart
51+
run: git checkout -- . 2>/dev/null || true
52+
- name: Dry-run Dart publish
53+
working-directory: sdk/dart
54+
run: flutter pub publish --dry-run
55+
1656
# ── Formatting ────────────────────────────────────────────────────────────
1757
fmt:
1858
name: Format

.github/workflows/release-sdk-kotlin.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@ on:
55
tags:
66
- "[0-9]+.[0-9]+.[0-9]+"
77
workflow_dispatch:
8+
inputs:
9+
publish:
10+
description: "Publish 1.1.0 artifacts to Maven Central from the selected ref"
11+
type: boolean
12+
default: false
813

914
permissions:
1015
contents: write
1116

1217
jobs:
1318
publish:
1419
name: Build and publish KMP library to Maven Central
15-
runs-on: macos-15
20+
runs-on: macos-26
1621

1722
env:
1823
GRESIQ_API_KEY_DEV: ${{ secrets.GRESIQ_API_KEY_DEV }}
@@ -133,8 +138,8 @@ jobs:
133138
working-directory: sdk/kotlin
134139
run: ./gradlew :lib:publishToMavenCentral --dry-run --no-configuration-cache
135140

136-
- name: Publish and release to Maven Central (tag push only)
137-
if: startsWith(github.ref, 'refs/tags/')
141+
- name: Publish and release to Maven Central (tag push or manual publish)
142+
if: startsWith(github.ref, 'refs/tags/') || (github.event_name == 'workflow_dispatch' && inputs.publish)
138143
working-directory: sdk/kotlin
139144
env:
140145
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}

.github/workflows/release-sdk-swift.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
token: ${{ secrets.ONDE_SWIFT_PAT }}
102102
path: onde-swift
103103

104-
- name: Rewrite Package.swift with release URL and checksum
104+
- name: Rewrite Package.swift release constants
105105
if: startsWith(github.ref, 'refs/tags/')
106106
env:
107107
CHECKSUM: ${{ steps.meta.outputs.checksum }}
@@ -116,22 +116,22 @@ jobs:
116116
url = os.environ["RELEASE_URL"]
117117
checksum = os.environ["CHECKSUM"].strip()
118118
119-
pattern = re.compile(
120-
r'\.binaryTarget\(\s*name:\s*"OndeFramework".*?\)',
121-
re.DOTALL,
119+
url_pattern = re.compile(
120+
r'(let releaseFrameworkURL =\s*\n\s*")([^"]+)(")',
121+
re.MULTILINE,
122122
)
123-
124-
replacement = (
125-
'.binaryTarget(\n'
126-
' name: "OndeFramework",\n'
127-
f' url: "{url}",\n'
128-
f' checksum: "{checksum}"\n'
129-
' )'
123+
checksum_pattern = re.compile(
124+
r'(let releaseFrameworkChecksum =\s*\n\s*")([^"]+)(")',
125+
re.MULTILINE,
130126
)
131127
132-
updated = pattern.sub(replacement, src)
133-
if updated == src:
134-
raise RuntimeError("binaryTarget pattern did not match — check Package.swift format")
128+
updated, url_count = url_pattern.subn(rf'\1{url}\3', src, count=1)
129+
updated, checksum_count = checksum_pattern.subn(rf'\1{checksum}\3', updated, count=1)
130+
131+
if url_count != 1:
132+
raise RuntimeError("releaseFrameworkURL pattern did not match — check Package.swift format")
133+
if checksum_count != 1:
134+
raise RuntimeError("releaseFrameworkChecksum pattern did not match — check Package.swift format")
135135
136136
pkg.write_text(updated)
137137
print("Package.swift updated:")

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
## 1.1.0
2+
3+
### Swift / UniFFI runtime stability
4+
5+
* Added `#[uniffi::export(async_runtime = "tokio")]` to the Swift/Kotlin FFI export surface so async UniFFI calls consistently run on the Tokio runtime.
6+
* Made pulse telemetry initialization lazy and panic-safe on Apple platforms. The GresIQ client is no longer created from the synchronous UniFFI constructor path, and telemetry now gracefully disables itself instead of crashing if a Tokio reactor is unavailable.
7+
* Added a one-time Rust panic hook so panics are logged through the host logger instead of relying on stderr in iOS/tvOS simulator and device contexts.
8+
9+
### Telemetry
10+
11+
* Added `ONDE_DISABLE_PULSE=1` as an explicit runtime kill switch for pulse telemetry during local validation and host-app debugging.
12+
* Hardened `model_loaded` and `inference_event` telemetry writes so they never require a current Tokio handle on the calling thread.
13+
14+
### Packaging
15+
16+
* Release metadata is aligned for Rust, Swift, Kotlin, Flutter/Dart, and React Native SDKs under version `1.1.0`.
17+
118
## 1.0.0
219

320
Onde has already been running in real Splitfire AB apps on the App Store for months, so keeping it on `0.x` no longer felt accurate.

0 commit comments

Comments
 (0)