-
Notifications
You must be signed in to change notification settings - Fork 60
feat: add modular resource fetcher adapters for Expo and bare React Native #759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rizalibnu
wants to merge
18
commits into
software-mansion:main
Choose a base branch
from
rizalibnu:feat/resource-fetcher-adapters
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,939
−949
Open
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 d37d7a1
feat: add bare React Native LLM chat example app
rizalibnu 109755b
Merge branch 'main' into feat/resource-fetcher-adapters
rizalibnu 748290f
feat: enhance resource fetcher with error handling and new methods fo…
rizalibnu 139926a
chore: exclude llm_bare app from workspace
rizalibnu d52df47
feat: integrate MMKV for persistent state storage in background downl…
rizalibnu 916feb1
Merge remote-tracking branch 'upstream/main' into feat/resource-fetch…
rizalibnu 8f6fa82
chore: temporarily remove bare RN LLM example app for code review
rizalibnu a9d16b4
chore: revert formatting in inference time and memory usage documenta…
rizalibnu 68dab92
chore: remove bare app directories from .gitignore
rizalibnu 529e49e
chore: update react-native-executorch dependency to allow any version
rizalibnu d324a74
docs: add bare and expo adapters with installation and usage instruct…
rizalibnu 96150b9
chore: bump version to 0.8.0 in package.json
rizalibnu af4ca6a
chore: add react-native-executorch as a dependency to adapters
rizalibnu 73d1957
chore: add RNFS to the spell check wordlist
rizalibnu 3638069
chore: update Node version in .nvmrc and adjust typecheck scripts in …
rizalibnu 359427b
chore: replace generic error with RnExecutorchError in ResourceFetche…
rizalibnu 614835e
chore: move yarn prepare from adapter typecheck scripts to CI workflow
rizalibnu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,3 +95,4 @@ Português | |
| codegen | ||
| cstdint | ||
| ocurred | ||
| RNFS | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| v20 | ||
| v22 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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/*