This repository develops React Native ExecuTorch. These instructions cover library contributions; application integration guidance lives in the documentation.
packages/react-native-executorch/: published library; TypeScript insrc/, native code incpp/, API tests in__tests__/, host C++ tests incpp/tests/.apps/computer-vision/,apps/nlp/,apps/speech/: Expo development apps for device verification.docs/: Docusaurus site with its own package and build scripts..agents/skills/: contributor procedures. Paths starting withsrc/orcpp/inside skills are relative topackages/react-native-executorch/unless stated otherwise.metadata.scopedescribes relevant paths; it is not an automatic instruction-loading mechanism.
Use the Node version in .nvmrc and Yarn version in root package.json. Run yarn install --immutable
from the repository root. The install normally provisions native binaries; for TypeScript-only work,
RNET_SKIP_DOWNLOAD=1 yarn install --immutable skips that download. Native builds need matching
headers/binaries and platform toolchains; see the verification skill before provisioning them.
Read only relevant skills. Start with core guidelines when learning the architecture.
| Task | Skill |
|---|---|
| Architecture, package boundaries, exports and model registry | Core guidelines |
| TypeScript task pipeline or React hook | Add task pipeline |
| C++ operation, JSI host function or native registration | Add native extension |
| Model schemas, method signatures and dimension constraints | Model schema validation |
| Throwing, catching or adding error codes | Error handling |
| TypeScript behavior and fake-runtime tests | Add API tests |
| Selecting checks, native builds or runtime debugging | Verify and build |
| Changing established APIs, helpers, conventions or skills | Skills maintenance |
| Documentation source, generation or versioning | Documentation README |
- Match existing code before inventing a new pattern. Core stays domain-agnostic; task orchestration belongs in TypeScript extensions. TypeScript-only changes do not require a C++ counterpart.
- Update public exports deliberately. Model configurations come from
src/models.ts; shared labels and constants come fromsrc/constants.ts. - Follow the task skill for native resource ownership and the error skill for coded failures across JSI/worklet boundaries.
- Update affected skills alongside API or convention changes. Link to the owning skill instead of copying its rules into other files.
Choose checks using the verification matrix. Commands below run from the repository root unless stated otherwise:
yarn workspace react-native-executorch typecheck: package types, including API tests.yarn workspace react-native-executorch test: TypeScript API tests against a fake native runtime.yarn workspace react-native-executorch prepare: build published JS and declaration outputs.yarn typecheck: broader workspace verification; runsyarn preparefirst.yarn buildfromdocs/: generated documentation and site validation.
Report checks actually run and missing prerequisites or skipped suites. Fake-runtime tests and host C++ tests do not prove device inference works. Documentation/skill-only changes need no native rebuild.