Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
19cc916
fix: correct base64 data URI segment count validation in readImage (#…
msluszniak Feb 18, 2026
1d12e8b
feat!: add modular resource fetcher adapters for Expo and bare React …
rizalibnu Feb 19, 2026
2d58410
docs: add analytics (gtm) (#821)
p-malecki Feb 19, 2026
e51547e
feat!: make image segmentation generic, general refactor (#814)
chmjkb Feb 23, 2026
31eca42
chore: Update tokenizers (#823)
benITo47 Feb 23, 2026
4f8bdd0
fix/feat!: LLMs context management (#819)
mateuszlampert Feb 23, 2026
acac022
chore/ci/docs: detect outdated TS API reference (#824)
mateuszlampert Feb 24, 2026
bda1494
fix: trigger workflow on any change to TS api (#835)
mateuszlampert Feb 24, 2026
510cdec
chore: Add weekly Dependabot updates for all packages (#836)
msluszniak Feb 25, 2026
949985e
fix: ask for permissions even if denied at some point (tool calling e…
mateuszlampert Feb 25, 2026
6794e21
chore: add support for lfm-2.5 instruct model (#822)
msluszniak Feb 25, 2026
d12ebc3
chore: aggregate all Dependabot security/dependency bumps (#838-#877)…
msluszniak Feb 26, 2026
3f4fdb5
chore!: Rename image segmentation to semanatic segmentation (#837)
benITo47 Feb 26, 2026
2b6ea20
chore: add support for semantic segmentation models DeeplabV3, LRASPP…
barhanc Feb 26, 2026
6f7dd18
chore: add llm config example to docs (#884)
mateuszlampert Feb 27, 2026
00fd99c
fix: Make package.json accept newer versions of libs, e.g. Expo (#886)
msluszniak Feb 27, 2026
62ac55d
feat: add integration with vision camera v5 (#810)
NorbertKlockiewicz Mar 2, 2026
10e0a80
docs: fix README.md and documentation about resource fetchers (#896)
msluszniak Mar 3, 2026
12b2500
feat!: (object detection) RF-detr support, generic model support (#826)
chmjkb Mar 3, 2026
e7ba9b2
chore: Update dependabot configuration for npm packages (#933)
msluszniak Mar 3, 2026
fdbd3e9
docs: update RELEASE.md with publishing workflow (#890)
chmjkb Mar 4, 2026
f43d3c5
fix: expose unload() JSI binding for TextToImageModule (#947)
yocontra Mar 9, 2026
310465d
feat!: allow passing pre-computed phonemes to Kokoro TTS
yocontra Mar 9, 2026
cc11c3e
fix: move model construction off the JS thread (#944)
yocontra Mar 10, 2026
e34d1a3
fix(kokoro): voice loading, method selection, padding, and audio safe…
yocontra Mar 10, 2026
a3f0cf9
chore: gitignore the API reference (#950)
chmjkb Mar 10, 2026
e0742e3
fix(kokoro): register streamStop on JSI host object (#951)
yocontra Mar 10, 2026
bb1d160
feat: add resource fetcher adapters for Expo and bare React Native
rizalibnu Jan 23, 2026
248d1b6
feat: add bare React Native LLM chat example app
rizalibnu Jan 23, 2026
a973890
feat: enhance resource fetcher with error handling and new methods fo…
rizalibnu Jan 27, 2026
3b93bc7
chore: exclude llm_bare app from workspace
rizalibnu Jan 27, 2026
8f310c1
feat: integrate MMKV for persistent state storage in background downl…
rizalibnu Jan 27, 2026
93f90ec
chore: temporarily remove bare RN LLM example app for code review
rizalibnu Jan 27, 2026
ebe6836
chore: remove bare app directories from .gitignore
rizalibnu Jan 27, 2026
f447454
chore: update react-native-executorch dependency to allow any version
rizalibnu Jan 27, 2026
af54de0
chore: add react-native-executorch as a dependency to adapters
rizalibnu Jan 27, 2026
6cc94d1
chore: update Node version in .nvmrc and adjust typecheck scripts in …
rizalibnu Jan 27, 2026
f2fcd03
chore: replace generic error with RnExecutorchError in ResourceFetche…
rizalibnu Jan 27, 2026
c6f73ec
chore: move yarn prepare from adapter typecheck scripts to CI workflow
rizalibnu Jan 27, 2026
502b2fc
chore: init bare React Native example app with @react-native-communit…
rizalibnu Jan 27, 2026
bbc2980
feat: add bare React Native LLM chat example app
rizalibnu Jan 28, 2026
799049a
fix: resolve merge conflicts, fix package refs, and remove tracked ge…
msluszniak Mar 9, 2026
02ae756
docs: add bare_rn app to Demo Apps section in README
msluszniak Mar 9, 2026
c6a6a76
fix: correct corrupted jest@29.7.0 lockfile entry with wrong dependen…
msluszniak Mar 9, 2026
676498e
fix: regenerate lockfile entries for @react-native/metro-config@0.81.5
msluszniak Mar 9, 2026
7fcdde1
fix: reset yarn.lock to main and regenerate cleanly for bare_rn works…
msluszniak Mar 9, 2026
a8ca09a
fix: revert bare-resource-fetcher typecheck script to avoid CI race c…
msluszniak Mar 9, 2026
ccd7c8e
feat: add ios/ and android/ native project files for bare_rn app
msluszniak Mar 9, 2026
63e5ec3
fix: add kconv gem for Ruby 3.4 compatibility in bare_rn
msluszniak Mar 9, 2026
dd44505
fix: pin CFPropertyList >= 3.0.9 to fix Ruby 3.4 kconv removal
msluszniak Mar 9, 2026
80a2111
fix: upgrade to CocoaPods >= 1.16.2 for Ruby 3.4 compatibility
msluszniak Mar 9, 2026
c8988a5
fix: add Gemfile.lock and Podfile.lock for bare_rn iOS
msluszniak Mar 9, 2026
83730cc
fix: fix Android Gradle paths for yarn workspace monorepo
msluszniak Mar 10, 2026
fe18a04
fix: use RNFS.downloadFile on Android to avoid background downloader …
msluszniak Mar 10, 2026
0b0f83d
Delete packages/react-native-executorch/common/rnexecutorch/tests/int…
msluszniak Mar 11, 2026
f0b3a33
chore: remove Readme from bare rn app
NorbertKlockiewicz Mar 12, 2026
bb76d97
docs: remove emojis from README headings and table of contents
msluszniak Mar 12, 2026
36f45c3
docs: remove emojis from headings in all translated READMEs
msluszniak Mar 12, 2026
c2edbf2
chore: update READMEs
msluszniak Mar 13, 2026
2539961
chore: align readmes
msluszniak Mar 13, 2026
7d1479c
chore: add suggestions from code review
msluszniak Mar 13, 2026
7700b7d
chore: fix android build
msluszniak Mar 13, 2026
c7eb2c1
chore: make error code specifically for resource fetcher
msluszniak Mar 16, 2026
fab283c
chore: add missing error codes
msluszniak Mar 16, 2026
cdb4af8
chore: add yarn prepare command for all packages
msluszniak Mar 16, 2026
f2979fc
docs: document new error code in documentation
msluszniak Mar 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .cspell-wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ microcontrollers
notimestamps
seqs
smollm
llms
qwen
XNNPACK
EFFICIENTNET
Expand Down Expand Up @@ -108,3 +109,22 @@ sublist
TTFT
timestamping
logprob
RNFS
pogodin
kesha
antonov
rfdetr
basemodule
IMAGENET
lraspp
LRASPP
worklet
worklets
BGRA
RGBA
DETR
detr
metaprogramming
ktlint
lefthook
espeak
2 changes: 1 addition & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "0.2",
"language": "en",
"ignorePaths": ["**/node_modules", "**/Pods"],
"ignorePaths": ["**/node_modules", "**/Pods", "**/readmes/**"],
"dictionaryDefinitions": [
{
"name": "project-words",
Expand Down
23 changes: 23 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2
updates:
- package-ecosystem: "npm"
directories:
- "/"
- "/packages/*"
- "/apps/*"
- "/docs"
schedule:
interval: "monthly"
groups:
security-updates:
applies-to: security-updates
patterns:
- "*"
all-updates:
applies-to: version-updates
patterns:
- "*"
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-patch"
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
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,15 @@ lib/
ios/generated
android/generated
apps/*/ios/
!apps/bare_rn/ios/
apps/*/android/
!apps/bare_rn/android/

# generated TypeDoc API reference (regenerated at build time)
docs/docs/06-api-reference/

# integration test model assets
packages/react-native-executorch/common/rnexecutorch/tests/integration/assets/models/

# custom
*.tgz
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
v22
76 changes: 45 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,24 @@ React Native ExecuTorch bridges the gap between React Native and native platform
[![CI](https://github.com/software-mansion/react-native-executorch/actions/workflows/ci.yml/badge.svg)](https://github.com/software-mansion/react-native-executorch/actions/workflows/ci.yml)

<details>
<summary><strong> :blue_book: Table of Contents </strong></summary>

- [:yin_yang: Supported Versions](#yin_yang-supported-versions)
- [:earth_africa: Real-world Example](#earth_africa-real-world-example)
- [:llama: Quickstart - Running Llama](#llama-quickstart---running-llama)
- [:calling: Demo Apps](#calling-demo-apps)
- [:robot: Ready-made Models](#robot-ready-made-models)
- [:books: Documentation](#books-documentation)
- [:balance_scale: License](#balance_scale-license)
- [:soon: What's Next?](#soon-whats-next)
<summary><strong>Table of Contents</strong></summary>

- [Supported Versions](#supported-versions)
- [Real-world Example](#real-world-example)
- [Quickstart - Running Llama](#quickstart---running-llama)
- [:one: Installation](#one-installation)
- [:two: Setup \& Initialization](#two-setup--initialization)
- [:three: Run the Model!](#three-run-the-model)
- [Demo Apps](#demo-apps)
- [Ready-made Models](#ready-made-models)
- [Documentation](#documentation)
- [License](#license)
- [What's Next?](#whats-next)
- [React Native ExecuTorch is created by Software Mansion](#react-native-executorch-is-created-by-software-mansion)

</details>

## :yin_yang: Supported Versions
## Supported Versions

The minimal supported version are:
* iOS 17.0
Expand All @@ -61,35 +65,50 @@ The minimal supported version are:
> [!IMPORTANT]
> React Native ExecuTorch supports only the [New React Native architecture](https://reactnative.dev/architecture/landing-page).

## :earth_africa: Real-world Example
## Real-world Example

React Native ExecuTorch is powering [Private Mind](https://privatemind.swmansion.com/), a privacy-first mobile AI app available on [App Store](https://apps.apple.com/gb/app/private-mind/id6746713439) and [Google Play](https://play.google.com/store/apps/details?id=com.swmansion.privatemind).

<img width="2720" height="1085" alt="Private Mind promo" src="https://github.com/user-attachments/assets/b12296fe-19ac-48fc-9726-da9242700346" />

## :llama: **Quickstart - Running Llama**
## Quickstart - Running Llama

**Get started with AI-powered text generation in 3 easy steps!**

### :one: **Installation**
### :one: Installation

```bash
# Install the package
yarn add react-native-executorch

# If you use expo, please add these packages for resource fetching:
yarn add @react-native-executorch/expo-resource-fetcher
yarn add expo-file-system expo-asset

#if you use bare React Native project use these packages:
yarn add @react-native-executorch/bare-resource-fetcher
yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader

# Depending on the platform, choose either iOS or Android
yarn expo run:< ios | android >
yarn < ios | android >
```

### :two: **Setup & Initialization**
### :two: Setup & Initialization

Add this to your component file:

```tsx
import {
useLLM,
LLAMA3_2_1B,
Message
Message,
initExecutorch,
} from 'react-native-executorch';
import { ExpoResourceFetcher } from '@react-native-executorch/expo-resource-fetcher';

initExecutorch({
resourceFetcher: ExpoResourceFetcher,
});

function MyComponent() {
// Initialize the model 🚀
Expand All @@ -98,7 +117,7 @@ function MyComponent() {
}
```

### :three: **Run the Model!**
### :three: Run the Model!

```tsx
const handleGenerate = async () => {
Expand All @@ -113,44 +132,39 @@ const handleGenerate = async () => {
};
```

## :calling: Demo Apps
## Demo Apps

We currently host a few example [apps](https://github.com/software-mansion/react-native-executorch/tree/main/apps) demonstrating use cases of our library:

- `llm` - Chat application showcasing use of LLMs
- `speech` - Speech to Text & Text to Speech task implementations
- `computer-vision` - Computer vision related tasks
- `text-embeddings` - Computing text representations for semantic search
- `bare_rn` - LLM chat example for bare React Native (without Expo)

If you would like to run demo app, navigate to its project directory and install dependencies with:

```bash
yarn
```

Then, depending on the platform, choose either iOS or Android:
If you would like to run a demo app, navigate to its project directory. Then install dependencies and run app with:

```bash
yarn expo run:< ios | android >
yarn && yarn < ios | android >
```

> [!WARNING]
> Running LLMs requires a significant amount of RAM. If you are encountering unexpected app crashes, try to increase the amount of RAM allocated to the emulator.

## :robot: Ready-made Models
## Ready-made Models

Our library has a number of ready-to-use AI models; a complete list is available in the documentation. If you're interested in running your own AI model, you need to first export it to the `.pte` format. Instructions on how to do this are available in the [Python API](https://docs.pytorch.org/executorch/stable/using-executorch-export.html) and [optimum-executorch README](https://github.com/huggingface/optimum-executorch?tab=readme-ov-file#option-2-export-and-load-separately).

## :books: Documentation
## Documentation

Check out how our library can help you build your React Native AI features by visiting our docs:
https://docs.swmansion.com/react-native-executorch

## :balance_scale: License
## License

This library is licensed under [The MIT License](./LICENSE).

## :soon: What's Next?
## What's Next?

To learn about our upcoming plans and developments, please visit our [milestones](https://github.com/software-mansion/react-native-executorch/milestones).

Expand Down
28 changes: 14 additions & 14 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

The release process of new minor version consists of the following steps:

1. Bump version in `package.json` to the new version `v{MAJOR}.{MINOR}.0`.
2. Update version tags in `packages/react-native-executorch/src/constants/modelUrls.ts` to point to the proper `MINOR` version and update tags on [🤗 huggingface](https://huggingface.co/software-mansion).
3. Commit with a message 'Release v{MAJOR}.{MINOR}.0'. (We want to keep the latest `MINOR` version on the `main` branch.)
4. Create a new release branch `release/{MAJOR}.{MINOR}`and push it to the remote.
5. Stability tests are performed on the release branch and all fixes to the new-found issues are pushed into the main branch and cherry-picked into the release branch. This allows for further development on the main branch without interfering with the release process.
6. Once all tests are passed, tag the release branch with proper version tag `v{MAJOR}.{MINOR}.0` and run `npm publish`.
7. Create versioned docs by running from repo root `(cd docs && yarn docusaurus docs:version {MAJOR}.{MINOR}.x)` (the 'x' part is intentional and is not to be substituted). Also, make sure that all the links in `api-reference` are not broken.
8. Create a PR with the updated docs.
9. Create the release notes on GitHub.
1. Update version tags in `packages/react-native-executorch/src/constants/modelUrls.ts` to point to the proper `MINOR` version and update tags on [🤗 huggingface](https://huggingface.co/software-mansion).
2. Commit with a message 'Release v{MAJOR}.{MINOR}.0'.
3. Create a new release branch `release/{MAJOR}.{MINOR}` and push it to the remote.
4. Stability tests are performed on the release branch and all fixes to the new-found issues are pushed into the main branch and cherry-picked into the release branch. This allows for further development on the main branch without interfering with the release process.
5. Once all tests are passed, tag the release branch with proper version tag `v{MAJOR}.{MINOR}.0` and run the [npm publish workflow](https://github.com/software-mansion/react-native-executorch/actions/workflows/npm-publish.yml).
6. Create the release notes on GitHub.
7. Bump version in `package.json` on the `main` branch to `v{MAJOR}.{NEXT_MINOR}.0` and commit with a message 'Bump version to v{MAJOR}.{NEXT_MINOR}.0'.
8. Create versioned docs by running from repo root `(cd docs && yarn docs:version {MAJOR}.{MINOR}.x)` (the 'x' part is intentional and is not to be substituted). Also, make sure that all the links in `api-reference` are not broken.
9. Create a PR with the updated docs.
10. Update README.md with release video, if available.
11. Update README.md links to release branch.

Expand All @@ -23,11 +23,11 @@ After the release branch is created and the version is published to npm we only
> [!CAUTION]
> Those changes should NOT include documentation changes, as they would be released automatically on the PR's merge and before the code changes are live. Instead create a separate PR with doc changes according to the [Docs update](#docs-update) section.

1. Create a PR to the main branch.
2. Once the PR is merged, `cherry-pick` the commit to the release branch.
3. Bump version in `package.json` to the new version `v{MAJOR}.{MINOR}.{REVISION}`.
Commit with a message 'Release v{MAJOR}.{MINOR}.0'.
4. Tag release branch with proper version tag `v{MAJOR}.{MINOR}.{REVISION}` and run `npm publish`.
1. Create a PR with the fix to the `main` branch.
2. Once the PR is merged, create a new branch off `release/{MAJOR}.{MINOR}`, cherry-pick the relevant commits from `main`, and open a PR targeting `release/{MAJOR}.{MINOR}`.
3. Once the PR is merged, bump version in `package.json` to the new version `v{MAJOR}.{MINOR}.{REVISION}`.
Commit with a message 'Release v{MAJOR}.{MINOR}.{REVISION}'.
4. Tag release branch with proper version tag `v{MAJOR}.{MINOR}.{REVISION}` and run the [npm publish workflow](https://github.com/software-mansion/react-native-executorch/actions/workflows/npm-publish.yml).
5. Create release notes on GitHub.

## Docs update
Expand Down
2 changes: 2 additions & 0 deletions apps/bare_rn/.bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
7 changes: 7 additions & 0 deletions apps/bare_rn/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
root: true,
extends: '@react-native',
parserOptions: {
requireConfigFile: false,
},
};
80 changes: 80 additions & 0 deletions apps/bare_rn/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
**/.xcode.env.local

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore
.kotlin/

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# Ruby / CocoaPods
**/Pods/
/vendor/bundle/

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# testing
/coverage

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Custom
!/ios/
!/android/
/assets/ai-models/
5 changes: 5 additions & 0 deletions apps/bare_rn/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
arrowParens: 'avoid',
singleQuote: true,
trailingComma: 'all',
};
1 change: 1 addition & 0 deletions apps/bare_rn/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Loading