Contributing
May 21, 2026 ยท View on GitHub
Thank you for your interest in contributing to React Native AI! This guide will help you get started.
Prerequisites
- Bun (latest version recommended)
- React Native development environment (Android Studio, Xcode)
Project Structure
This is a monorepo with the following packages:
packages/mlc/- MLC-LLM integration for React Nativepackages/apple-llm/- Apple Intelligence turbo module for iOSapps/expo-example/- example Expo app
Quick Start
-
Clone and install dependencies:
git clone https://github.com/callstackincubator/ai.git cd ai bun install -
Run quality checks:
bun run typecheck bun run lint -
Test your changes:
# Run example app cd apps/expo-example bun run start bun run android # or ios
Development Guidelines
Code Quality
- Follow existing code style and patterns
- Ensure TypeScript types are properly defined
- Run
bun run lint --fixto fix formatting issues
Native Code
- Android: Use Kotlin, follow existing patterns in
packages/*/android/ - iOS: Use Swift/Objective-C++, follow existing patterns in
packages/*/ios/
Commit Messages
Follow Conventional Commits:
feat:new featuresfix:bug fixesdocs:documentation changesrefactor:code refactoringtest:test additions/updateschore:tooling/config changes
Pull Request Process
- Fork the repository
- Create a feature branch from
main - Make your changes following the guidelines above
- Test thoroughly with both example apps
- Submit a pull request with:
- Clear description of changes
- Screenshots/videos for UI changes
- Test plan for reviewers
Common Tasks
Working with packages
Build all packages
bun run --filter='@react-native-ai/*' prepare
Work on specific package
cd packages/mlc
bun run typecheck
Running examples
cd apps/expo-example
bun run prestart # Setup MLC dependencies
bun run start
bun run android
Native Development
-
Android: Open
apps/expo-example/androidin Android Studio -
iOS MLC: Open
apps/expo-example/ios/AiExample.xcworkspacein Xcode -
RN example app: Open
apps/expo-example/ios/example.xcworkspacein Xcode- The Apple Intelligence package is a Turbo Module - work directly from the integrated Xcode project
- Native code is in
packages/apple-llm/ios/but best developed through the example app
Required Native Builds
The demos require the MLC package to have built the MLC-LLM engine libraries for Android and iOS. We publish the package with prebuilt binaries and this monorepo contains a postinstall script that fetches them on initial setup so you don't need to go through the prerequisites for the MLC package yourself. Set SKIP_MLC_PREBUILT_FETCH=1 to opt out, or run
bun run fetch-prebuilt in packages/mlc package to fetch manually. Rebuild from source with
build:runtime:ios / build:runtime:android when needed.
Need Help?
- Check existing issues
- Review the code of conduct
- Ask questions in pull request discussions
We appreciate all contributions, big and small! ๐