expo-local-llm 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Package.swift +20 -0
- package/README.md +4 -2
- package/android/build.gradle +1 -1
- package/package.json +14 -12
package/Package.swift
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// swift-tools-version: 6.2
|
|
2
|
+
import PackageDescription
|
|
3
|
+
|
|
4
|
+
// Expo's SwiftPM autolinker resolves this dependency relative to the package's
|
|
5
|
+
// generated symlink, next to the generated ExpoModulesCoreHeaders package.
|
|
6
|
+
let package = Package(
|
|
7
|
+
name: "expo-local-llm",
|
|
8
|
+
platforms: [.iOS("16.4")],
|
|
9
|
+
products: [.library(name: "ExpoLocalLlm", targets: ["ExpoLocalLlm"])],
|
|
10
|
+
dependencies: [.package(path: "../ExpoModulesCoreHeaders")],
|
|
11
|
+
targets: [
|
|
12
|
+
.target(
|
|
13
|
+
name: "ExpoLocalLlm",
|
|
14
|
+
dependencies: [.product(name: "ExpoModulesCoreHeaders", package: "ExpoModulesCoreHeaders")],
|
|
15
|
+
path: "ios",
|
|
16
|
+
exclude: ["ExpoLocalLlm.podspec"]
|
|
17
|
+
)
|
|
18
|
+
],
|
|
19
|
+
swiftLanguageModes: [.v5]
|
|
20
|
+
)
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ The full JavaScript API measures approximately **17.8 kB minified / 6.0 kB gzipp
|
|
|
13
13
|
|
|
14
14
|
Inference stays on the device, with no cloud fallback. Once the model is ready, generation works offline; initial model provisioning or downloads may require network access and device storage. Tool handlers you write may also access the network.
|
|
15
15
|
|
|
16
|
-
[^js-size]: Measured from the built package entry point with Bun 1.4.
|
|
16
|
+
[^js-size]: Measured from the built package entry point with Bun 1.4.5: a minified browser-target ESM bundle, all public exports retained, packages external, and default `node:zlib` gzip compression. Sizes use decimal kB. This standalone JS measurement excludes Expo, React, React Native, native SDKs (including Android ML Kit), and model assets; it is not a Metro/Hermes or installed-app size measurement. Reproduce with `bun run build && bun run check:size`. CI enforces budgets of 18,000 minified bytes and 6,200 gzip bytes.
|
|
17
17
|
|
|
18
18
|
[Setup](#quick-start) · [Usage](#usage) · [API reference](docs/api.md) · [Troubleshooting](docs/troubleshooting.md) · [Changelog](CHANGELOG.md)
|
|
19
19
|
|
|
@@ -125,6 +125,8 @@ If the project targets an iOS version below 16.4, the build fails with `module '
|
|
|
125
125
|
|
|
126
126
|
For setup failures, unavailable models and unsupported features, see [troubleshooting](docs/troubleshooting.md).
|
|
127
127
|
|
|
128
|
+
The npm package supports CocoaPods and the Expo SwiftPM preview. The SwiftPM path requires `expo` 58.0.19 or later for direct `Package.swift` autolinking. We verified both build paths on `expo` 58.1.0. [Expo SwiftPM preview](https://expo.dev/changelog/sdk-58#swift-package-manager-builds) · [Build verification record](docs/release-verification.md#ios-swiftpm-build-verification)
|
|
129
|
+
|
|
128
130
|
### Xcode 27 requires scene support
|
|
129
131
|
|
|
130
132
|
Apps built with the iOS 27 SDK must adopt the UIKit scene lifecycle, or UIKit stops them at launch before any JavaScript runs. Expo SDK 58 apps adopt it by default, so there is nothing to set. Expo SDK 57 apps opt in through `expo-build-properties` (Expo `57.0.23`+, `expo-build-properties` `57.0.20`+):
|
|
@@ -410,7 +412,7 @@ Existing React Native apps can use this library after [installing Expo Modules s
|
|
|
410
412
|
|
|
411
413
|
## Used by
|
|
412
414
|
|
|
413
|
-
-
|
|
415
|
+
- Angular Native uses `expo-local-llm` for on-device inference through the `LanguageModel` service in `@ng-native/expo`. [Angular Native integration docs](https://ng-native.com/packages/expo/language-model)
|
|
414
416
|
- [PulseID](https://apps.apple.com/us/app/pulseid-heart-rate-camera/id6754331991): heart rate camera
|
|
415
417
|
- [Teamfit Tactics](https://apps.apple.com/us/app/teamfit-tactics-tft-fitness/id6757195493): TFT fitness
|
|
416
418
|
|
package/android/build.gradle
CHANGED
|
@@ -44,7 +44,7 @@ dependencies {
|
|
|
44
44
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0'
|
|
45
45
|
|
|
46
46
|
testImplementation 'junit:junit:4.13.2'
|
|
47
|
-
testImplementation 'org.robolectric:robolectric:4.
|
|
47
|
+
testImplementation 'org.robolectric:robolectric:4.18.1'
|
|
48
48
|
androidTestImplementation 'androidx.test:runner:1.7.0'
|
|
49
49
|
androidTestImplementation 'junit:junit:4.13.2'
|
|
50
50
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-local-llm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Expo module for on-device LLM inference via Apple Foundation Models (iOS) and Gemini Nano (Android)",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
|
+
"Package.swift",
|
|
8
9
|
"build",
|
|
9
10
|
"src",
|
|
10
11
|
"ios/*.swift",
|
|
@@ -55,21 +56,22 @@
|
|
|
55
56
|
"license": "MIT",
|
|
56
57
|
"homepage": "https://github.com/GijungKim/expo-local-llm#readme",
|
|
57
58
|
"devDependencies": {
|
|
58
|
-
"@oxlint/plugins": "1.
|
|
59
|
-
"@react-native/jest-preset": "0.88.
|
|
59
|
+
"@oxlint/plugins": "1.94.0",
|
|
60
|
+
"@react-native/jest-preset": "0.88.1",
|
|
60
61
|
"@types/react": "~19.3.0",
|
|
61
|
-
"@types/react-test-renderer": "19.3.
|
|
62
|
-
"
|
|
63
|
-
"
|
|
62
|
+
"@types/react-test-renderer": "19.3.1",
|
|
63
|
+
"babel-preset-expo": "~58.0.27",
|
|
64
|
+
"eslint": "10.15.0",
|
|
65
|
+
"expo": "~58.1.0",
|
|
64
66
|
"expo-module-scripts": "^56.0.2",
|
|
65
|
-
"expo-modules-core": "~58.0
|
|
66
|
-
"jest-expo": "~58.0.
|
|
67
|
-
"knip": "6.
|
|
68
|
-
"oxlint": "1.
|
|
67
|
+
"expo-modules-core": "~58.2.0",
|
|
68
|
+
"jest-expo": "~58.0.16",
|
|
69
|
+
"knip": "6.48.0",
|
|
70
|
+
"oxlint": "1.94.0",
|
|
69
71
|
"react": "19.3.0",
|
|
70
|
-
"react-native": "0.88.
|
|
72
|
+
"react-native": "0.88.1",
|
|
71
73
|
"react-test-renderer": "19.3.0",
|
|
72
|
-
"tsrs": "0.
|
|
74
|
+
"tsrs": "0.25.0-ts7.1.0-beta",
|
|
73
75
|
"typescript": "6.0.3"
|
|
74
76
|
},
|
|
75
77
|
"jest": {
|