Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8575eb4
feat: add resource fetcher adapters for Expo and bare React Native
rizalibnu Jan 23, 2026
d37d7a1
feat: add bare React Native LLM chat example app
rizalibnu Jan 23, 2026
109755b
Merge branch 'main' into feat/resource-fetcher-adapters
rizalibnu Jan 24, 2026
748290f
feat: enhance resource fetcher with error handling and new methods fo…
rizalibnu Jan 27, 2026
139926a
chore: exclude llm_bare app from workspace
rizalibnu Jan 27, 2026
d52df47
feat: integrate MMKV for persistent state storage in background downl…
rizalibnu Jan 27, 2026
916feb1
Merge remote-tracking branch 'upstream/main' into feat/resource-fetch…
rizalibnu Jan 27, 2026
8f6fa82
chore: temporarily remove bare RN LLM example app for code review
rizalibnu Jan 27, 2026
a9d16b4
chore: revert formatting in inference time and memory usage documenta…
rizalibnu Jan 27, 2026
68dab92
chore: remove bare app directories from .gitignore
rizalibnu Jan 27, 2026
529e49e
chore: update react-native-executorch dependency to allow any version
rizalibnu Jan 27, 2026
d324a74
docs: add bare and expo adapters with installation and usage instruct…
rizalibnu Jan 27, 2026
96150b9
chore: bump version to 0.8.0 in package.json
rizalibnu Jan 27, 2026
af4ca6a
chore: add react-native-executorch as a dependency to adapters
rizalibnu Jan 27, 2026
73d1957
chore: add RNFS to the spell check wordlist
rizalibnu Jan 27, 2026
3638069
chore: update Node version in .nvmrc and adjust typecheck scripts in …
rizalibnu Jan 27, 2026
359427b
chore: replace generic error with RnExecutorchError in ResourceFetche…
rizalibnu Jan 27, 2026
614835e
chore: move yarn prepare from adapter typecheck scripts to CI workflow
rizalibnu Jan 27, 2026
3db78aa
Merge branch 'main' into feat/resource-fetcher-adapters
rizalibnu Jan 29, 2026
de85d45
chore: update workspaces to use wildcard patterns for packages and apps
rizalibnu Jan 29, 2026
1dc8951
fix: handle directory creation errors in ResourceFetcherUtils
rizalibnu Jan 29, 2026
aa193e8
refactor: rename adapters to resource-fetcher packages
rizalibnu Jan 29, 2026
219e06f
refactor: add resetAdapter method to ResourceFetcher
rizalibnu Jan 30, 2026
43a1147
refactor: simplify ResourceFetcherAdapter interface
rizalibnu Jan 30, 2026
89ea1ea
build: configure TypeScript compilation for resource-fetcher packages
rizalibnu Jan 30, 2026
0104367
refactor: streamline Typecheck step in CI workflow
rizalibnu Jan 30, 2026
ac19ef5
refactor: update CI workflow and package scripts for improved type ch…
rizalibnu Jan 30, 2026
450a50d
Merge branch 'main' into feat/resource-fetcher-adapters
rizalibnu Feb 7, 2026
5f21035
refactor: extract download completion logic and improve type safety
rizalibnu Feb 8, 2026
db98ba8
docs: complete JSDoc documentation for ResourceFetcher modules
rizalibnu Feb 8, 2026
f9e110d
Merge remote-tracking branch 'upstream/main' into feat/resource-fetch…
rizalibnu Feb 9, 2026
6816409
docs: Change docs to align them with the current state of resource fe…
msluszniak Feb 16, 2026
c4f63e8
Change configuration in LLMModule so it can be set before loading mod…
msluszniak Feb 11, 2026
bdb3616
chore!: don't resize the image segmentation output by default, change…
chmjkb Feb 11, 2026
ea096e1
Change executorch binaries (#802)
benITo47 Feb 11, 2026
a1556b9
feat!: Add time stamping to speech to text (#742)
msluszniak Feb 12, 2026
9db6e3b
remove unused headers
msluszniak Feb 16, 2026
e06996f
Merge branch 'main' into feat/resource-fetcher-adapters
msluszniak Feb 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .cspell-wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ Português
codegen
cstdint
ocurred
RNFS
libfbjni
libc
gradlew
Expand All @@ -104,5 +105,8 @@ POTTEDPLANT
TVMONITOR
sublist
TTFT
pogodin
kesha
antonov
timestamping
logprob
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: yarn lint

- name: Typecheck files
run: yarn typecheck
run: yarn workspaces foreach --all --topological-dev run prepare && yarn typecheck

build-library:
runs-on: ubuntu-latest
Expand All @@ -35,7 +35,5 @@ jobs:
- name: Setup
uses: ./.github/actions/setup

- name: Build package
run: |
cd packages/react-native-executorch
yarn prepare
- name: Build all packages
run: yarn workspaces foreach --all --topological-dev run prepare
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
v22
7 changes: 7 additions & 0 deletions apps/computer-vision/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { Drawer } from 'expo-router/drawer';
import { initExecutorch } from 'react-native-executorch';
import { ExpoResourceFetcher } from '@react-native-executorch/expo-resource-fetcher';

import ColorPalette from '../colors';
import React, { useState } from 'react';
import { Text, StyleSheet, View } from 'react-native';
Expand All @@ -10,6 +13,10 @@ import {
} from '@react-navigation/drawer';
import { GeneratingContext } from '../context';

initExecutorch({
resourceFetcher: ExpoResourceFetcher,
});

interface CustomDrawerProps extends DrawerContentComponentProps {
isGenerating: boolean;
}
Expand Down
5 changes: 3 additions & 2 deletions apps/computer-vision/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"lint": "eslint . --ext .ts,.tsx --fix"
},
"dependencies": {
"@react-native/metro-config": "^0.76.3",
"@react-native-executorch/expo-resource-fetcher": "workspace:*",
"@react-native/metro-config": "^0.81.5",
"@react-navigation/drawer": "^7.3.9",
"@react-navigation/native": "^7.1.6",
"@shopify/react-native-skia": "2.2.12",
Expand All @@ -21,7 +22,7 @@
"expo-linking": "~8.0.10",
"expo-router": "~6.0.17",
"expo-status-bar": "~3.0.9",
"metro-config": "^0.81.0",
"metro-config": "^0.81.5",
"react": "19.1.0",
"react-native": "0.81.5",
"react-native-device-info": "^14.0.4",
Expand Down
5 changes: 4 additions & 1 deletion apps/computer-vision/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"customConditions": ["react-native"],
"noEmit": true,
"paths": {
"react-native-executorch": ["../../packages/react-native-executorch/src"]
"react-native-executorch": ["../../packages/react-native-executorch/src"],
"@react-native-executorch/expo-resource-fetcher": [
"../../packages/expo-resource-fetcher/src"
]
}
}
}
7 changes: 6 additions & 1 deletion apps/llm/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import { Drawer } from 'expo-router/drawer';
import { initExecutorch } from 'react-native-executorch';
import { ExpoResourceFetcher } from '@react-native-executorch/expo-resource-fetcher';
import ColorPalette from '../colors';
import React, { useState } from 'react';
import { Text, StyleSheet, View } from 'react-native';

import {
DrawerContentComponentProps,
DrawerContentScrollView,
DrawerItemList,
} from '@react-navigation/drawer';
import { GeneratingContext } from '../context';

initExecutorch({
resourceFetcher: ExpoResourceFetcher,
});

interface CustomDrawerProps extends DrawerContentComponentProps {
isGenerating: boolean;
}
Expand Down
5 changes: 3 additions & 2 deletions apps/llm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"lint": "eslint . --ext .ts,.tsx --fix"
},
"dependencies": {
"@react-native/metro-config": "^0.76.3",
"@react-native-executorch/expo-resource-fetcher": "workspace:*",
"@react-native/metro-config": "^0.81.5",
"@react-navigation/drawer": "^7.3.9",
"@react-navigation/native": "^7.1.6",
"expo": "^54.0.27",
Expand All @@ -22,7 +23,7 @@
"expo-linking": "~8.0.10",
"expo-router": "~6.0.17",
"expo-status-bar": "~3.0.9",
"metro-config": "^0.81.0",
"metro-config": "^0.81.5",
"react": "19.1.0",
"react-native": "0.81.5",
"react-native-audio-api": "^0.8.2",
Expand Down
5 changes: 4 additions & 1 deletion apps/llm/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"customConditions": ["react-native"],
"noEmit": true,
"paths": {
"react-native-executorch": ["../../packages/react-native-executorch/src"]
"react-native-executorch": ["../../packages/react-native-executorch/src"],
"@react-native-executorch/expo-resource-fetcher": [
"../../packages/expo-resource-fetcher/src"
]
}
}
}
6 changes: 6 additions & 0 deletions apps/speech/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import { SpeechToTextScreen } from './screens/SpeechToTextScreen';
import ColorPalette from './colors';
import ExecutorchLogo from './assets/executorch.svg';
import { Quiz } from './screens/Quiz';
import { initExecutorch } from 'react-native-executorch';
import { ExpoResourceFetcher } from '@react-native-executorch/expo-resource-fetcher';

initExecutorch({
resourceFetcher: ExpoResourceFetcher,
});

export default function App() {
const [currentScreen, setCurrentScreen] = useState<
Expand Down
5 changes: 3 additions & 2 deletions apps/speech/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
"lint": "eslint . --ext .ts,.tsx --fix"
},
"dependencies": {
"@react-native/metro-config": "^0.76.3",
"@react-native-executorch/expo-resource-fetcher": "workspace:*",
"@react-native/metro-config": "^0.81.5",
"buffer": "^6.0.3",
"expo": "^54.0.27",
"expo-font": "~14.0.10",
"expo-status-bar": "~3.0.9",
"metro-config": "^0.81.0",
"metro-config": "^0.81.5",
"react": "19.1.0",
"react-native": "0.81.5",
"react-native-audio-api": "0.11.3",
Expand Down
5 changes: 4 additions & 1 deletion apps/speech/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"customConditions": ["react-native"],
"noEmit": true,
"paths": {
"react-native-executorch": ["../../packages/react-native-executorch/src"]
"react-native-executorch": ["../../packages/react-native-executorch/src"],
"@react-native-executorch/expo-resource-fetcher": [
"../../packages/expo-resource-fetcher/src"
]
}
}
}
6 changes: 6 additions & 0 deletions apps/text-embeddings/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Drawer } from 'expo-router/drawer';
import { initExecutorch } from 'react-native-executorch';
import { ExpoResourceFetcher } from '@react-native-executorch/expo-resource-fetcher';
import ColorPalette from '../colors';
import React, { useState } from 'react';
import { Text, StyleSheet, View } from 'react-native';
Expand All @@ -10,6 +12,10 @@ import {
} from '@react-navigation/drawer';
import { GeneratingContext } from '../context';

initExecutorch({
resourceFetcher: ExpoResourceFetcher,
});

interface CustomDrawerProps extends DrawerContentComponentProps {
isGenerating: boolean;
}
Expand Down
1 change: 1 addition & 0 deletions apps/text-embeddings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@react-navigation/native": "*"
},
"dependencies": {
"@react-native-executorch/expo-resource-fetcher": "workspace:*",
"@react-navigation/drawer": "^7.3.9",
"expo": "^54.0.27",
"expo-constants": "~18.0.11",
Expand Down
5 changes: 4 additions & 1 deletion apps/text-embeddings/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"customConditions": ["react-native"],
"noEmit": true,
"paths": {
"react-native-executorch": ["../../packages/react-native-executorch/src"]
"react-native-executorch": ["../../packages/react-native-executorch/src"],
"@react-native-executorch/expo-resource-fetcher": [
"../../packages/expo-resource-fetcher/src"
]
}
}
}
2 changes: 1 addition & 1 deletion docs/docs/01-fundamentals/01-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Installation is pretty straightforward, just use your favorite package manager.
</TabItem>
</Tabs>

If you're using bare React Native (instead of a managed Expo project), you also need to install Expo Modules because the underlying implementation relies on expo-file-system. Since expo-file-system is an Expo package, bare React Native projects need **Expo Modules** to properly integrate and use it. The link provided (https://docs.expo.dev/bare/installing-expo-modules/) offers guidance on setting up Expo Modules in a bare React Native environment.
Our library offers support for both bare React Native and Expo projects. We encourage you to use Expo project if possible. If you are planning to migrate from bare React Native to Expo project, the link (https://docs.expo.dev/bare/installing-expo-modules/) offers a guidance on setting up Expo Modules in a bare React Native environment.

If you plan on using your models via require() instead of fetching them from a url, you also need to add following lines to your `metro.config.js`:

Expand Down
40 changes: 40 additions & 0 deletions docs/docs/01-fundamentals/02-loading-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,46 @@ title: Loading Models

There are three different methods available for loading model files, depending on their size and location.

## Prerequisites

In our library, you can use two different resource fetching mechanisms. One is implemented using Expo module, the other one uses external file-system library. We encourage you to use implementation utilizing Expo if possible. But sometimes you cannot add Expo module to your project, then you should use bare React Native implementation.

To use initialize Expo adapter, please add these libraries:

```bash
yarn add @rn-executorch/expo-adapter
yarn add expo-file-system expo-asset
```

and then add the following code in your React Native app:

```typescript
import { initExecutorch } from 'react-native-executorch';
import { ExpoResourceFetcher } from '@react-native-executorch/expo-resource-fetcher';

initExecutorch({
resourceFetcher: ExpoResourceFetcher,
});
```

If you cannot use Expo in your project, proceed with the following steps:

```bash
yarn add @rn-executorch/bare-adapter
yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader
```

and

```typescript
import { initExecutorch } from 'react-native-executorch';
import { BareResourceFetcher } from '@rn-executorch/bare-adapter';

initExecutorch({
resourceFetcher: BareResourceFetcher,
});
```

**1. Load from React Native assets folder (For Files < 512MB)**

```typescript
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/01-fundamentals/03-frequently-asked-questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ If your model doesn't support it, you can still work around it using context. Fo

### Can I use React Native ExecuTorch in bare React Native apps?

To use the library, you need to install Expo Modules first. For a setup guide, refer to [this tutorial](https://docs.expo.dev/bare/installing-expo-modules/). This is because we use Expo File System under the hood to download and manage the model binaries.
Yes, staring from version `0.8.x` you can use React Native ExecuTorch in bare React Native apps. You just need to use bare React Native resource fetcher instead of Expo one, see: [Loading models section](./02-loading-models.md) for more details.

### Do you support the old architecture?

Expand Down
Loading