Skip to content

About

On-device AI examples for React Native ExecuTorch - computer vision, LLMs, speech transcription & more.

Topics

Resources

Stars

8 stars

Watchers

0 watching

Forks

Repository files navigation

React Native ExecuTorch Gallery

On-device AI. Private. Offline. In your pocket.

A local model explains the Schrödinger equation with rendered LaTeX, then the reply scrolls behind the floating composer On-device speech generation with word highlighting and replay An on-device search for somewhere peaceful ranks a forest photo first

Demos

Explore the categories below. Each demo links to its screen implementation.

Generative AI
Computer vision
Real time
Audio & speech
Embeddings & search
Natural language processing

Getting started

Requirements: Node.js 24 and npm. Git/source builds also use Corepack for the library’s pinned Yarn version. Native builds require Xcode 26.4 or newer for iOS, or Android Studio and Java 17 for Android.

nvm use
corepack enable
npm run deps:sync
npm run ios        # or npm run android

The app uses Expo SDK 57 and React Native 0.86, targeting iOS 17+ and Android 13+. It requires a native build; Expo Go is not supported.

Choosing the library version

executorch.json records the selected source. The default is a pinned Git revision, so a fresh checkout can restore the same library without a sibling repository or submodule.

npm run deps:status                    # Show the selection and installed version
npm run deps:sync                      # Restore the recorded choice

Choose a published release:

npm run deps:use -- npm latest

Replace latest with an exact published version or another npm dist-tag. Tags resolve to an exact version before installation.

Choose cutting-edge source:

npm run deps:use -- git main

A branch, tag, or commit is accepted. The resolved commit is saved; deps:sync reuses that pin. Run the selection command again to update a moving branch. Git builds use the source repository's pinned Yarn and a managed checkout in the ignored .executorch/ directory.

Use an existing monorepo while developing the library:

npm run deps:use -- local ../react-native-executorch
# Existing shortcut:
npm run deps:local

Local mode builds the working tree, including uncommitted changes. Before sharing a version change, choose a published release or a Git revision that CI can fetch. The selector never switches or resets your editable library checkout.

Commit executorch.json, package.json, and package-lock.json together after changing the selection, and rebuild the native app. The chosen library must support the APIs used by this gallery revision.

Source builds are packed into content-addressed .local-packages/*.tgz files, exercising the package's exports, postinstall, and native autolinking. These snapshots are ignored by Git: run deps:sync on a fresh checkout to restore the recorded archive and perform a frozen npm ci installation. Sync fails rather than rewriting the dependency selection if a rebuilt archive differs. Library source is a snapshot, not a live symlink. The package's nativeLibsVersion selects its prebuilt ExecuTorch binaries; building the underlying C++ runtime is a separate workflow.

Development and testing

npm start               # Metro for an installed development build
npm run check           # All fast checks used in CI
npm test                # Version-selector regression tests
npm run typecheck
npm run lint
npm run format:check

Lefthook installs pre-commit checks with the dev dependencies. If hooks were skipped, run npm run hooks:install. Hooks check formatting without modifying staged files.

For native release builds and model/device checks, see Verification. CI builds Android and iOS release binaries on pull requests ready for review without signing credentials. Draft pull requests skip CI; marking them ready starts the checks and builds.

Documentation

Library guides and API references: docs.swmansion.com/react-native-executorch.

Created by Software Mansion

Since 2012, Software Mansion has been building mobile and web apps, contributing to open-source software, and working on React Native as Core React Native Contributors. We can help you build your next AI product — Hire us.

swm

About

On-device AI examples for React Native ExecuTorch - computer vision, LLMs, speech transcription & more.

Topics

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages