Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 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
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
1 change: 1 addition & 0 deletions .cspell-wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,4 @@ Português
codegen
cstdint
ocurred
RNFS
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ jobs:
run: yarn lint

- name: Typecheck files
run: yarn typecheck
run: |
cd packages/react-native-executorch
yarn prepare
cd ../../
yarn typecheck
build-library:
runs-on: ubuntu-latest
Expand Down
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 '@rn-executorch/expo-adapter';

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,17 +11,18 @@
"lint": "eslint . --ext .ts,.tsx --fix"
},
"dependencies": {
"@react-native/metro-config": "^0.76.3",
"@react-native/metro-config": "^0.81.5",
"@react-navigation/drawer": "^7.3.9",
"@react-navigation/native": "^7.1.6",
"@rn-executorch/expo-adapter": "workspace:*",
"@shopify/react-native-skia": "2.2.12",
"expo": "^54.0.27",
"expo-constants": "~18.0.11",
"expo-font": "~14.0.10",
"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
3 changes: 2 additions & 1 deletion apps/computer-vision/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"customConditions": ["react-native"],
"noEmit": true,
"paths": {
"react-native-executorch": ["../../packages/react-native-executorch/src"]
"react-native-executorch": ["../../packages/react-native-executorch/src"],
"@rn-executorch/expo-adapter": ["../../packages/expo-adapter/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 '@rn-executorch/expo-adapter';
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,9 +11,10 @@
"lint": "eslint . --ext .ts,.tsx --fix"
},
"dependencies": {
"@react-native/metro-config": "^0.76.3",
"@react-native/metro-config": "^0.81.5",
"@react-navigation/drawer": "^7.3.9",
"@react-navigation/native": "^7.1.6",
"@rn-executorch/expo-adapter": "workspace:*",
"expo": "^54.0.27",
"expo-brightness": "~14.0.8",
"expo-calendar": "~15.0.8",
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
3 changes: 2 additions & 1 deletion apps/llm/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"customConditions": ["react-native"],
"noEmit": true,
"paths": {
"react-native-executorch": ["../../packages/react-native-executorch/src"]
"react-native-executorch": ["../../packages/react-native-executorch/src"],
"@rn-executorch/expo-adapter": ["../../packages/expo-adapter/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 '@rn-executorch/expo-adapter';

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/metro-config": "^0.81.5",
"@rn-executorch/expo-adapter": "workspace:*",
"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.6.5",
Expand Down
3 changes: 2 additions & 1 deletion apps/speech/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"customConditions": ["react-native"],
"noEmit": true,
"paths": {
"react-native-executorch": ["../../packages/react-native-executorch/src"]
"react-native-executorch": ["../../packages/react-native-executorch/src"],
"@rn-executorch/expo-adapter": ["../../packages/expo-adapter/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 '@rn-executorch/expo-adapter';
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 @@ -15,6 +15,7 @@
},
"dependencies": {
"@react-navigation/drawer": "^7.3.9",
"@rn-executorch/expo-adapter": "workspace:*",
"expo": "^54.0.27",
"expo-constants": "~18.0.11",
"expo-linking": "~8.0.10",
Expand Down
3 changes: 2 additions & 1 deletion apps/text-embeddings/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"customConditions": ["react-native"],
"noEmit": true,
"paths": {
"react-native-executorch": ["../../packages/react-native-executorch/src"]
"react-native-executorch": ["../../packages/react-native-executorch/src"],
"@rn-executorch/expo-adapter": ["../../packages/expo-adapter/src"]
}
}
}
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
"workspaces": {
"packages": [
"packages/react-native-executorch",
"apps/*"
"packages/bare-adapter",
"packages/expo-adapter",
"apps/computer-vision",
"apps/llm",
"apps/speech",
"apps/text-embeddings"
Comment on lines +10 to +13
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need to expanded apps/*

]
},
"scripts": {
Expand Down
30 changes: 30 additions & 0 deletions packages/bare-adapter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# @rn-executorch/bare-adapter

Bare React Native adapter for `react-native-executorch` that provides resource fetching capabilities using native filesystem libraries.

## Installation

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

## Usage

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

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

## When to Use

Use this adapter if you're working with:
- Bare React Native projects (created with `npx @react-native-community/cli@latest init`)
- Projects that need true background downloads
- Projects requiring direct native filesystem access

This adapter uses `@dr.pogodin/react-native-fs` and `@kesha-antonov/react-native-background-downloader` for enhanced file operations and background download support.
32 changes: 32 additions & 0 deletions packages/bare-adapter/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "@rn-executorch/bare-adapter",
"version": "0.1.0",
"description": "Bare React Native adapter for react-native-executorch",
"main": "src/index.ts",
"types": "src/index.ts",
"exports": {
".": {
"import": "./src/index.ts",
"types": "./src/index.ts"
}
},
"scripts": {
"typecheck": "tsc --noEmit",
"lint": "eslint \"**/*.{js,ts,tsx}\""
},
"peerDependencies": {
"@dr.pogodin/react-native-fs": "^2.0.0",
"@kesha-antonov/react-native-background-downloader": "^4.0.0",
"react-native": "*",
"react-native-executorch": "*"
},
"devDependencies": {
"@dr.pogodin/react-native-fs": "^2.36.2",
"@kesha-antonov/react-native-background-downloader": "^4.4.5",
"@types/react": "~19.1.10",
"react": "19.1.0",
"react-native": "0.81.5",
"react-native-executorch": "workspace:*",
"typescript": "~5.9.2"
}
}
Loading
Loading