├── .bundle └── config ├── .eslintrc.js ├── .gitignore ├── .node-version ├── .prettierrc.js ├── .watchmanconfig ├── App.tsx ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── __tests__ └── App-test.tsx ├── android ├── app │ ├── build.gradle │ ├── debug.keystore │ ├── proguard-rules.pro │ └── src │ │ ├── debug │ │ ├── AndroidManifest.xml │ │ └── java │ │ │ └── com │ │ │ └── rustinreactnativedemo │ │ │ └── ReactNativeFlipper.java │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── rustinreactnativedemo │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ ├── jni │ │ │ ├── CMakeLists.txt │ │ │ └── OnLoad.cpp │ │ └── res │ │ │ ├── drawable │ │ │ └── rn_edit_text_material.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── release │ │ └── java │ │ └── com │ │ └── rustinreactnativedemo │ │ └── ReactNativeFlipper.java ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── app.json ├── babel.config.js ├── index.js ├── ios ├── .xcode.env ├── Podfile ├── Podfile.lock ├── RustInReactNativeDemo.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── RustInReactNativeDemo.xcscheme ├── RustInReactNativeDemo.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── RustInReactNativeDemo │ ├── AppDelegate.h │ ├── AppDelegate.mm │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Info.plist │ ├── LaunchScreen.storyboard │ └── main.m └── RustInReactNativeDemoTests │ ├── Info.plist │ └── RustInReactNativeDemoTests.m ├── metro.config.js ├── package.json ├── rust ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── build.rs └── src │ └── lib.rs ├── tm ├── AppTurboModules.podspec ├── CMakeLists.txt ├── NativeTurboModule.cpp ├── NativeTurboModule.h ├── NativeTurboModule.ts ├── RustCallback.cpp ├── RustCallback.h ├── RustPromiseManager.cpp ├── RustPromiseManager.h └── build-rust-native-library.sh ├── tsconfig.json └── yarn.lock /.bundle/config: -------------------------------------------------------------------------------- 1 | BUNDLE_PATH: "vendor/bundle" 2 | BUNDLE_FORCE_RUBY_PLATFORM: 1 3 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | ios/.xcode.env.local 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | *.hprof 33 | .cxx/ 34 | *.keystore 35 | !debug.keystore 36 | 37 | # node.js 38 | # 39 | node_modules/ 40 | npm-debug.log 41 | yarn-error.log 42 | 43 | # fastlane 44 | # 45 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 46 | # screenshots whenever they are needed. 47 | # For more information about the recommended setup visit: 48 | # https://docs.fastlane.tools/best-practices/source-control/ 49 | 50 | **/fastlane/report.xml 51 | **/fastlane/Preview.html 52 | **/fastlane/screenshots 53 | **/fastlane/test_output 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # Ruby / CocoaPods 59 | /ios/Pods/ 60 | /vendor/bundle/ 61 | 62 | # Temporary files created by Metro to check the health of the file watcher 63 | .metro-health-check* 64 | 65 | tm/dist 66 | -------------------------------------------------------------------------------- /.node-version: -------------------------------------------------------------------------------- 1 | 18 2 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | arrowParens: 'avoid', 3 | bracketSameLine: true, 4 | bracketSpacing: false, 5 | singleQuote: true, 6 | trailingComma: 'all', 7 | }; 8 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /App.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | import React from 'react'; 9 | import type {PropsWithChildren} from 'react'; 10 | import { 11 | SafeAreaView, 12 | ScrollView, 13 | StatusBar, 14 | StyleSheet, 15 | Text, 16 | useColorScheme, 17 | View, 18 | TextInput, 19 | } from 'react-native'; 20 | 21 | import { Colors, Header } from 'react-native/Libraries/NewAppScreen'; 22 | import NativeTurboModule from './tm/NativeTurboModule'; 23 | 24 | type SectionProps = PropsWithChildren<{ 25 | title: string; 26 | }>; 27 | 28 | function Section({children, title}: SectionProps): JSX.Element { 29 | const isDarkMode = useColorScheme() === 'dark'; 30 | return ( 31 | 32 | 39 | {title} 40 | 41 | 48 | {children} 49 | 50 | 51 | ); 52 | } 53 | 54 | function App(): JSX.Element { 55 | const isDarkMode = useColorScheme() === 'dark'; 56 | 57 | const backgroundStyle = { 58 | backgroundColor: isDarkMode ? Colors.darker : Colors.lighter, 59 | }; 60 | 61 | const [firstInput, setFirstInput] = React.useState(''); 62 | const [secondInput, setSecondInput] = React.useState(''); 63 | 64 | const [addResult, setAddResult] = React.useState(''); 65 | React.useEffect(() => { 66 | (async () => { 67 | const result = await NativeTurboModule.add( 68 | parseInt(firstInput), 69 | parseInt(secondInput), 70 | ); 71 | setAddResult(result.toString()); 72 | })(); 73 | }, [firstInput, secondInput]); 74 | 75 | return ( 76 | 77 | 81 | 84 |
85 | 89 |
90 | 91 | 97 | 103 | 104 | 105 | 106 | Sum = {addResult} 107 | 108 | 109 |
110 |
111 | 112 | 113 | ); 114 | } 115 | 116 | const styles = StyleSheet.create({ 117 | sectionContainer: { 118 | marginTop: 32, 119 | paddingHorizontal: 24, 120 | }, 121 | sectionTitle: { 122 | fontSize: 24, 123 | fontWeight: '600', 124 | }, 125 | sectionDescription: { 126 | marginTop: 8, 127 | fontSize: 18, 128 | fontWeight: '400', 129 | }, 130 | textInputContainer: { 131 | flexDirection: 'row', 132 | }, 133 | textInput: { 134 | height: 40, 135 | width: '100%', 136 | flex: 1, 137 | borderWidth: 1, 138 | borderRadius: 4, 139 | margin: 8, 140 | padding: 8, 141 | }, 142 | centerTextContainer: { 143 | width: '100%', 144 | }, 145 | centerText: { 146 | textAlign: 'center', 147 | fontSize: 24, 148 | }, 149 | }); 150 | 151 | export default App; 152 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby '>= 2.6.10' 5 | 6 | gem 'cocoapods', '>= 1.11.3' 7 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | CFPropertyList (3.0.6) 5 | rexml 6 | activesupport (7.0.4.3) 7 | concurrent-ruby (~> 1.0, >= 1.0.2) 8 | i18n (>= 1.6, < 2) 9 | minitest (>= 5.1) 10 | tzinfo (~> 2.0) 11 | addressable (2.8.4) 12 | public_suffix (>= 2.0.2, < 6.0) 13 | algoliasearch (1.27.5) 14 | httpclient (~> 2.8, >= 2.8.3) 15 | json (>= 1.5.1) 16 | atomos (0.1.3) 17 | claide (1.1.0) 18 | cocoapods (1.12.1) 19 | addressable (~> 2.8) 20 | claide (>= 1.0.2, < 2.0) 21 | cocoapods-core (= 1.12.1) 22 | cocoapods-deintegrate (>= 1.0.3, < 2.0) 23 | cocoapods-downloader (>= 1.6.0, < 2.0) 24 | cocoapods-plugins (>= 1.0.0, < 2.0) 25 | cocoapods-search (>= 1.0.0, < 2.0) 26 | cocoapods-trunk (>= 1.6.0, < 2.0) 27 | cocoapods-try (>= 1.1.0, < 2.0) 28 | colored2 (~> 3.1) 29 | escape (~> 0.0.4) 30 | fourflusher (>= 2.3.0, < 3.0) 31 | gh_inspector (~> 1.0) 32 | molinillo (~> 0.8.0) 33 | nap (~> 1.0) 34 | ruby-macho (>= 2.3.0, < 3.0) 35 | xcodeproj (>= 1.21.0, < 2.0) 36 | cocoapods-core (1.12.1) 37 | activesupport (>= 5.0, < 8) 38 | addressable (~> 2.8) 39 | algoliasearch (~> 1.0) 40 | concurrent-ruby (~> 1.1) 41 | fuzzy_match (~> 2.0.4) 42 | nap (~> 1.0) 43 | netrc (~> 0.11) 44 | public_suffix (~> 4.0) 45 | typhoeus (~> 1.0) 46 | cocoapods-deintegrate (1.0.5) 47 | cocoapods-downloader (1.6.3) 48 | cocoapods-plugins (1.0.0) 49 | nap 50 | cocoapods-search (1.0.1) 51 | cocoapods-trunk (1.6.0) 52 | nap (>= 0.8, < 2.0) 53 | netrc (~> 0.11) 54 | cocoapods-try (1.2.0) 55 | colored2 (3.1.2) 56 | concurrent-ruby (1.2.2) 57 | escape (0.0.4) 58 | ethon (0.16.0) 59 | ffi (>= 1.15.0) 60 | ffi (1.15.5) 61 | fourflusher (2.3.1) 62 | fuzzy_match (2.0.4) 63 | gh_inspector (1.1.3) 64 | httpclient (2.8.3) 65 | i18n (1.13.0) 66 | concurrent-ruby (~> 1.0) 67 | json (2.6.3) 68 | minitest (5.18.0) 69 | molinillo (0.8.0) 70 | nanaimo (0.3.0) 71 | nap (1.1.0) 72 | netrc (0.11.0) 73 | public_suffix (4.0.7) 74 | rexml (3.2.5) 75 | ruby-macho (2.5.1) 76 | typhoeus (1.4.0) 77 | ethon (>= 0.9.0) 78 | tzinfo (2.0.6) 79 | concurrent-ruby (~> 1.0) 80 | xcodeproj (1.22.0) 81 | CFPropertyList (>= 2.3.3, < 4.0) 82 | atomos (~> 0.1.3) 83 | claide (>= 1.0.2, < 2.0) 84 | colored2 (~> 3.1) 85 | nanaimo (~> 0.3.0) 86 | rexml (~> 3.2.4) 87 | 88 | PLATFORMS 89 | ruby 90 | 91 | DEPENDENCIES 92 | cocoapods (>= 1.11.3) 93 | 94 | RUBY VERSION 95 | ruby 2.7.6p219 96 | 97 | BUNDLED WITH 98 | 2.3.26 99 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2023, Ashoat Tevosyan 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rust-in-react-native-demo 2 | Demo of how to use Rust in React Native 3 | -------------------------------------------------------------------------------- /__tests__/App-test.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | apply plugin: "com.facebook.react" 3 | 4 | import com.android.build.OutputFile 5 | 6 | /** 7 | * This is the configuration block to customize your React Native Android app. 8 | * By default you don't need to apply any configuration, just uncomment the lines you need. 9 | */ 10 | react { 11 | /* Folders */ 12 | // The root of your project, i.e. where "package.json" lives. Default is '..' 13 | // root = file("../") 14 | // The folder where the react-native NPM package is. Default is ../node_modules/react-native 15 | // reactNativeDir = file("../node_modules/react-native") 16 | // The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen 17 | // codegenDir = file("../node_modules/react-native-codegen") 18 | // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js 19 | // cliFile = file("../node_modules/react-native/cli.js") 20 | 21 | /* Variants */ 22 | // The list of variants to that are debuggable. For those we're going to 23 | // skip the bundling of the JS bundle and the assets. By default is just 'debug'. 24 | // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants. 25 | // debuggableVariants = ["liteDebug", "prodDebug"] 26 | 27 | /* Bundling */ 28 | // A list containing the node command and its flags. Default is just 'node'. 29 | // nodeExecutableAndArgs = ["node"] 30 | // 31 | // The command to run when bundling. By default is 'bundle' 32 | // bundleCommand = "ram-bundle" 33 | // 34 | // The path to the CLI configuration file. Default is empty. 35 | // bundleConfig = file(../rn-cli.config.js) 36 | // 37 | // The name of the generated asset file containing your JS bundle 38 | // bundleAssetName = "MyApplication.android.bundle" 39 | // 40 | // The entry file for bundle generation. Default is 'index.android.js' or 'index.js' 41 | // entryFile = file("../js/MyApplication.android.js") 42 | // 43 | // A list of extra flags to pass to the 'bundle' commands. 44 | // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle 45 | // extraPackagerArgs = [] 46 | 47 | /* Hermes Commands */ 48 | // The hermes compiler command to run. By default it is 'hermesc' 49 | // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc" 50 | // 51 | // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" 52 | // hermesFlags = ["-O", "-output-source-map"] 53 | } 54 | 55 | /** 56 | * Set this to true to create four separate APKs instead of one, 57 | * one for each native architecture. This is useful if you don't 58 | * use App Bundles (https://developer.android.com/guide/app-bundle/) 59 | * and want to have separate APKs to upload to the Play Store. 60 | */ 61 | def enableSeparateBuildPerCPUArchitecture = false 62 | 63 | /** 64 | * Set this to true to Run Proguard on Release builds to minify the Java bytecode. 65 | */ 66 | def enableProguardInReleaseBuilds = false 67 | 68 | /** 69 | * The preferred build flavor of JavaScriptCore (JSC) 70 | * 71 | * For example, to use the international variant, you can use: 72 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 73 | * 74 | * The international variant includes ICU i18n library and necessary data 75 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 76 | * give correct results when using with locales other than en-US. Note that 77 | * this variant is about 6MiB larger per architecture than default. 78 | */ 79 | def jscFlavor = 'org.webkit:android-jsc:+' 80 | 81 | /** 82 | * Private function to get the list of Native Architectures you want to build. 83 | * This reads the value from reactNativeArchitectures in your gradle.properties 84 | * file and works together with the --active-arch-only flag of react-native run-android. 85 | */ 86 | def reactNativeArchitectures() { 87 | def value = project.getProperties().get("reactNativeArchitectures") 88 | return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] 89 | } 90 | 91 | android { 92 | ndkVersion rootProject.ext.ndkVersion 93 | 94 | compileSdkVersion rootProject.ext.compileSdkVersion 95 | 96 | namespace "com.rustinreactnativedemo" 97 | defaultConfig { 98 | applicationId "com.rustinreactnativedemo" 99 | minSdkVersion rootProject.ext.minSdkVersion 100 | targetSdkVersion rootProject.ext.targetSdkVersion 101 | versionCode 1 102 | versionName "1.0" 103 | } 104 | 105 | splits { 106 | abi { 107 | reset() 108 | enable enableSeparateBuildPerCPUArchitecture 109 | universalApk false // If true, also generate a universal APK 110 | include (*reactNativeArchitectures()) 111 | } 112 | } 113 | signingConfigs { 114 | debug { 115 | storeFile file('debug.keystore') 116 | storePassword 'android' 117 | keyAlias 'androiddebugkey' 118 | keyPassword 'android' 119 | } 120 | } 121 | buildTypes { 122 | debug { 123 | signingConfig signingConfigs.debug 124 | } 125 | release { 126 | // Caution! In production, you need to generate your own keystore file. 127 | // see https://reactnative.dev/docs/signed-apk-android. 128 | signingConfig signingConfigs.debug 129 | minifyEnabled enableProguardInReleaseBuilds 130 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 131 | } 132 | } 133 | 134 | // applicationVariants are e.g. debug, release 135 | applicationVariants.all { variant -> 136 | variant.outputs.each { output -> 137 | // For each separate APK per architecture, set a unique version code as described here: 138 | // https://developer.android.com/studio/build/configure-apk-splits.html 139 | // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. 140 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] 141 | def abi = output.getFilter(OutputFile.ABI) 142 | if (abi != null) { // null for the universal-debug, universal-release variants 143 | output.versionCodeOverride = 144 | defaultConfig.versionCode * 1000 + versionCodes.get(abi) 145 | } 146 | 147 | } 148 | } 149 | } 150 | 151 | dependencies { 152 | // The version of react-native is set by the React Native Gradle Plugin 153 | implementation("com.facebook.react:react-android") 154 | 155 | implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0") 156 | 157 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") 158 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { 159 | exclude group:'com.squareup.okhttp3', module:'okhttp' 160 | } 161 | 162 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") 163 | if (hermesEnabled.toBoolean()) { 164 | implementation("com.facebook.react:hermes-android") 165 | } else { 166 | implementation jscFlavor 167 | } 168 | } 169 | 170 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) 171 | 172 | android { 173 | externalNativeBuild { 174 | cmake { 175 | path "src/main/jni/CMakeLists.txt" 176 | } 177 | } 178 | } 179 | -------------------------------------------------------------------------------- /android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashoat/rust-in-react-native-demo/1c3474364a469582be545cf5b86af317ecb199be/android/app/debug.keystore -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /android/app/src/debug/java/com/rustinreactnativedemo/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.rustinreactnativedemo; 8 | 9 | import android.content.Context; 10 | import com.facebook.flipper.android.AndroidFlipperClient; 11 | import com.facebook.flipper.android.utils.FlipperUtils; 12 | import com.facebook.flipper.core.FlipperClient; 13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; 14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; 15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; 16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping; 17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; 18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; 19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; 20 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 21 | import com.facebook.react.ReactInstanceEventListener; 22 | import com.facebook.react.ReactInstanceManager; 23 | import com.facebook.react.bridge.ReactContext; 24 | import com.facebook.react.modules.network.NetworkingModule; 25 | import okhttp3.OkHttpClient; 26 | 27 | /** 28 | * Class responsible of loading Flipper inside your React Native application. This is the debug 29 | * flavor of it. Here you can add your own plugins and customize the Flipper setup. 30 | */ 31 | public class ReactNativeFlipper { 32 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 33 | if (FlipperUtils.shouldEnableFlipper(context)) { 34 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 35 | 36 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 37 | client.addPlugin(new DatabasesFlipperPlugin(context)); 38 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 39 | client.addPlugin(CrashReporterPlugin.getInstance()); 40 | 41 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 42 | NetworkingModule.setCustomClientBuilder( 43 | new NetworkingModule.CustomClientBuilder() { 44 | @Override 45 | public void apply(OkHttpClient.Builder builder) { 46 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 47 | } 48 | }); 49 | client.addPlugin(networkFlipperPlugin); 50 | client.start(); 51 | 52 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 53 | // Hence we run if after all native modules have been initialized 54 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 55 | if (reactContext == null) { 56 | reactInstanceManager.addReactInstanceEventListener( 57 | new ReactInstanceEventListener() { 58 | @Override 59 | public void onReactContextInitialized(ReactContext reactContext) { 60 | reactInstanceManager.removeReactInstanceEventListener(this); 61 | reactContext.runOnNativeModulesQueueThread( 62 | new Runnable() { 63 | @Override 64 | public void run() { 65 | client.addPlugin(new FrescoFlipperPlugin()); 66 | } 67 | }); 68 | } 69 | }); 70 | } else { 71 | client.addPlugin(new FrescoFlipperPlugin()); 72 | } 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/rustinreactnativedemo/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.rustinreactnativedemo; 2 | 3 | import com.facebook.react.ReactActivity; 4 | import com.facebook.react.ReactActivityDelegate; 5 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; 6 | import com.facebook.react.defaults.DefaultReactActivityDelegate; 7 | 8 | public class MainActivity extends ReactActivity { 9 | 10 | /** 11 | * Returns the name of the main component registered from JavaScript. This is used to schedule 12 | * rendering of the component. 13 | */ 14 | @Override 15 | protected String getMainComponentName() { 16 | return "RustInReactNativeDemo"; 17 | } 18 | 19 | /** 20 | * Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link 21 | * DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React 22 | * (aka React 18) with two boolean flags. 23 | */ 24 | @Override 25 | protected ReactActivityDelegate createReactActivityDelegate() { 26 | return new DefaultReactActivityDelegate( 27 | this, 28 | getMainComponentName(), 29 | // If you opted-in for the New Architecture, we enable the Fabric Renderer. 30 | DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled 31 | // If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18). 32 | DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/rustinreactnativedemo/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.rustinreactnativedemo; 2 | 3 | import android.app.Application; 4 | import com.facebook.react.PackageList; 5 | import com.facebook.react.ReactApplication; 6 | import com.facebook.react.ReactNativeHost; 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; 9 | import com.facebook.react.defaults.DefaultReactNativeHost; 10 | import com.facebook.soloader.SoLoader; 11 | import java.util.List; 12 | 13 | public class MainApplication extends Application implements ReactApplication { 14 | 15 | private final ReactNativeHost mReactNativeHost = 16 | new DefaultReactNativeHost(this) { 17 | @Override 18 | public boolean getUseDeveloperSupport() { 19 | return BuildConfig.DEBUG; 20 | } 21 | 22 | @Override 23 | protected List getPackages() { 24 | @SuppressWarnings("UnnecessaryLocalVariable") 25 | List packages = new PackageList(this).getPackages(); 26 | // Packages that cannot be autolinked yet can be added manually here, for example: 27 | // packages.add(new MyReactNativePackage()); 28 | return packages; 29 | } 30 | 31 | @Override 32 | protected String getJSMainModuleName() { 33 | return "index"; 34 | } 35 | 36 | @Override 37 | protected boolean isNewArchEnabled() { 38 | return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; 39 | } 40 | 41 | @Override 42 | protected Boolean isHermesEnabled() { 43 | return BuildConfig.IS_HERMES_ENABLED; 44 | } 45 | }; 46 | 47 | @Override 48 | public ReactNativeHost getReactNativeHost() { 49 | return mReactNativeHost; 50 | } 51 | 52 | @Override 53 | public void onCreate() { 54 | super.onCreate(); 55 | SoLoader.init(this, /* native exopackage */ false); 56 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { 57 | // If you opted-in for the New Architecture, we load the native entry point for this app. 58 | DefaultNewArchitectureEntryPoint.load(); 59 | } 60 | ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /android/app/src/main/jni/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Meta Platforms, Inc. and affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | # This CMake file is the default used by apps and is placed inside react-native 7 | # to encapsulate it from user space (so you won't need to touch C++/Cmake code at all on Android). 8 | # 9 | # If you wish to customize it (because you want to manually link a C++ library or pass a custom 10 | # compilation flag) you can: 11 | # 12 | # 1. Copy this CMake file inside the `android/app/src/main/jni` folder of your project 13 | # 2. Copy the OnLoad.cpp (in this same folder) file inside the same folder as above. 14 | # 3. Extend your `android/app/build.gradle` as follows 15 | # 16 | # android { 17 | # // Other config here... 18 | # externalNativeBuild { 19 | # cmake { 20 | # path "src/main/jni/CMakeLists.txt" 21 | # } 22 | # } 23 | # } 24 | 25 | cmake_minimum_required(VERSION 3.13) 26 | 27 | # Define the library name here. 28 | project(appmodules) 29 | 30 | # This file includes all the necessary to let you build your application with the New Architecture. 31 | include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake) 32 | 33 | # App needs to add and link against tm (TurboModules) folder 34 | add_subdirectory(${REACT_ANDROID_DIR}/../../../tm/ tm_build) 35 | target_link_libraries(${CMAKE_PROJECT_NAME} tm) 36 | -------------------------------------------------------------------------------- /android/app/src/main/jni/OnLoad.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | // This C++ file is part of the default configuration used by apps and is placed 9 | // inside react-native to encapsulate it from user space (so you won't need to 10 | // touch C++/Cmake code at all on Android). 11 | // 12 | // If you wish to customize it (because you want to manually link a C++ library 13 | // or pass a custom compilation flag) you can: 14 | // 15 | // 1. Copy this CMake file inside the `android/app/src/main/jni` folder of your 16 | // project 17 | // 2. Copy the OnLoad.cpp (in this same folder) file inside the same folder as 18 | // above. 19 | // 3. Extend your `android/app/build.gradle` as follows 20 | // 21 | // android { 22 | // // Other config here... 23 | // externalNativeBuild { 24 | // cmake { 25 | // path "src/main/jni/CMakeLists.txt" 26 | // } 27 | // } 28 | // } 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | namespace facebook { 38 | namespace react { 39 | 40 | void registerComponents( 41 | std::shared_ptr registry) { 42 | // Custom Fabric Components go here. You can register custom 43 | // components coming from your App or from 3rd party libraries here. 44 | // 45 | // providerRegistry->add(concreteComponentDescriptorProvider< 46 | // AocViewerComponentDescriptor>()); 47 | 48 | // By default we just use the components autolinked by RN CLI 49 | rncli_registerProviders(registry); 50 | } 51 | 52 | std::shared_ptr cxxModuleProvider( 53 | const std::string &name, 54 | const std::shared_ptr &jsInvoker) { 55 | if (name == "NativeTurboModule") { 56 | return std::make_shared(jsInvoker); 57 | } 58 | return nullptr; 59 | } 60 | 61 | std::shared_ptr javaModuleProvider( 62 | const std::string &name, 63 | const JavaTurboModule::InitParams ¶ms) { 64 | // Here you can provide your own module provider for TurboModules coming from 65 | // either your application or from external libraries. The approach to follow 66 | // is similar to the following (for a library called `samplelibrary`): 67 | // 68 | // auto module = samplelibrary_ModuleProvider(moduleName, params); 69 | // if (module != nullptr) { 70 | // return module; 71 | // } 72 | // return rncore_ModuleProvider(moduleName, params); 73 | 74 | // By default we just use the module providers autolinked by RN CLI 75 | return rncli_ModuleProvider(name, params); 76 | } 77 | 78 | } // namespace react 79 | } // namespace facebook 80 | 81 | JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) { 82 | return facebook::jni::initialize(vm, [] { 83 | facebook::react::DefaultTurboModuleManagerDelegate::cxxModuleProvider = 84 | &facebook::react::cxxModuleProvider; 85 | facebook::react::DefaultTurboModuleManagerDelegate::javaModuleProvider = 86 | &facebook::react::javaModuleProvider; 87 | facebook::react::DefaultComponentsRegistry:: 88 | registerComponentDescriptorsFromEntryPoint = 89 | &facebook::react::registerComponents; 90 | }); 91 | } 92 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/rn_edit_text_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 21 | 22 | 23 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashoat/rust-in-react-native-demo/1c3474364a469582be545cf5b86af317ecb199be/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashoat/rust-in-react-native-demo/1c3474364a469582be545cf5b86af317ecb199be/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashoat/rust-in-react-native-demo/1c3474364a469582be545cf5b86af317ecb199be/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashoat/rust-in-react-native-demo/1c3474364a469582be545cf5b86af317ecb199be/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashoat/rust-in-react-native-demo/1c3474364a469582be545cf5b86af317ecb199be/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashoat/rust-in-react-native-demo/1c3474364a469582be545cf5b86af317ecb199be/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashoat/rust-in-react-native-demo/1c3474364a469582be545cf5b86af317ecb199be/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashoat/rust-in-react-native-demo/1c3474364a469582be545cf5b86af317ecb199be/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashoat/rust-in-react-native-demo/1c3474364a469582be545cf5b86af317ecb199be/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashoat/rust-in-react-native-demo/1c3474364a469582be545cf5b86af317ecb199be/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | RustInReactNativeDemo 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /android/app/src/release/java/com/rustinreactnativedemo/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.rustinreactnativedemo; 8 | 9 | import android.content.Context; 10 | import com.facebook.react.ReactInstanceManager; 11 | 12 | /** 13 | * Class responsible of loading Flipper inside your React Native application. This is the release 14 | * flavor of it so it's empty as we don't want to load Flipper. 15 | */ 16 | public class ReactNativeFlipper { 17 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 18 | // Do nothing as we don't want to initialize Flipper on Release. 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "33.0.0" 6 | minSdkVersion = 21 7 | compileSdkVersion = 33 8 | targetSdkVersion = 33 9 | 10 | // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. 11 | ndkVersion = "23.1.7779620" 12 | } 13 | repositories { 14 | google() 15 | mavenCentral() 16 | } 17 | dependencies { 18 | classpath("com.android.tools.build:gradle:7.3.1") 19 | classpath("com.facebook.react:react-native-gradle-plugin") 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m 13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Version of flipper SDK to use with React Native 28 | FLIPPER_VERSION=0.125.0 29 | 30 | # Use this property to specify which architecture you want to build. 31 | # You can also override it from the CLI using 32 | # ./gradlew -PreactNativeArchitectures=x86_64 33 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 34 | 35 | # Use this property to enable support to the new architecture. 36 | # This will allow you to use TurboModules and the Fabric render in 37 | # your application. You should enable this flag either if you want 38 | # to write custom TurboModules/Fabric components OR use libraries that 39 | # are providing them. 40 | newArchEnabled=true 41 | 42 | # Use this property to enable or disable the Hermes JS engine. 43 | # If set to false, you will be using JSC instead. 44 | hermesEnabled=true 45 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashoat/rust-in-react-native-demo/1c3474364a469582be545cf5b86af317ecb199be/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | # 21 | # Gradle start up script for POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 84 | 85 | APP_NAME="Gradle" 86 | APP_BASE_NAME=${0##*/} 87 | 88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 | 138 | Please set the JAVA_HOME variable in your environment to match the 139 | location of your Java installation." 140 | fi 141 | 142 | # Increase the maximum file descriptors if we can. 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 | case $MAX_FD in #( 145 | max*) 146 | MAX_FD=$( ulimit -H -n ) || 147 | warn "Could not query maximum file descriptor limit" 148 | esac 149 | case $MAX_FD in #( 150 | '' | soft) :;; #( 151 | *) 152 | ulimit -n "$MAX_FD" || 153 | warn "Could not set maximum file descriptor limit to $MAX_FD" 154 | esac 155 | fi 156 | 157 | # Collect all arguments for the java command, stacking in reverse order: 158 | # * args from the command line 159 | # * the main class name 160 | # * -classpath 161 | # * -D...appname settings 162 | # * --module-path (only if needed) 163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 164 | 165 | # For Cygwin or MSYS, switch paths to Windows format before running java 166 | if "$cygwin" || "$msys" ; then 167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 169 | 170 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 171 | 172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 173 | for arg do 174 | if 175 | case $arg in #( 176 | -*) false ;; # don't mess with options #( 177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 178 | [ -e "$t" ] ;; #( 179 | *) false ;; 180 | esac 181 | then 182 | arg=$( cygpath --path --ignore --mixed "$arg" ) 183 | fi 184 | # Roll the args list around exactly as many times as the number of 185 | # args, so each arg winds up back in the position where it started, but 186 | # possibly modified. 187 | # 188 | # NB: a `for` loop captures its iteration list before it begins, so 189 | # changing the positional parameters here affects neither the number of 190 | # iterations, nor the values presented in `arg`. 191 | shift # remove old arg 192 | set -- "$@" "$arg" # push replacement arg 193 | done 194 | fi 195 | 196 | # Collect all arguments for the java command; 197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 198 | # shell script including quotes and variable substitutions, so put them in 199 | # double quotes to make sure that they get re-expanded; and 200 | # * put everything else in single quotes, so that it's not re-expanded. 201 | 202 | set -- \ 203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 204 | -classpath "$CLASSPATH" \ 205 | org.gradle.wrapper.GradleWrapperMain \ 206 | "$@" 207 | 208 | # Use "xargs" to parse quoted args. 209 | # 210 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 211 | # 212 | # In Bash we could simply go: 213 | # 214 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 215 | # set -- "${ARGS[@]}" "$@" 216 | # 217 | # but POSIX shell has neither arrays nor command substitution, so instead we 218 | # post-process each arg (as a line of input to sed) to backslash-escape any 219 | # character that might be a shell metacharacter, then use eval to reverse 220 | # that process (while maintaining the separation between arguments), and wrap 221 | # the whole thing up as a single "set" statement. 222 | # 223 | # This will of course break if any of these variables contains a newline or 224 | # an unmatched quote. 225 | # 226 | 227 | eval "set -- $( 228 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 229 | xargs -n1 | 230 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 231 | tr '\n' ' ' 232 | )" '"$@"' 233 | 234 | exec "$JAVACMD" "$@" 235 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'RustInReactNativeDemo' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | includeBuild('../node_modules/react-native-gradle-plugin') 5 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RustInReactNativeDemo", 3 | "displayName": "RustInReactNativeDemo" 4 | } -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /ios/.xcode.env: -------------------------------------------------------------------------------- 1 | # This `.xcode.env` file is versioned and is used to source the environment 2 | # used when running script phases inside Xcode. 3 | # To customize your local environment, you can create an `.xcode.env.local` 4 | # file that is not versioned. 5 | 6 | # NODE_BINARY variable contains the PATH to the node executable. 7 | # 8 | # Customize the NODE_BINARY variable here. 9 | # For example, to use nvm with brew, add the following line 10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use 11 | export NODE_BINARY=$(command -v node) 12 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, min_ios_version_supported 5 | prepare_react_native_project! 6 | 7 | # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. 8 | # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded 9 | # 10 | # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` 11 | # ```js 12 | # module.exports = { 13 | # dependencies: { 14 | # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), 15 | # ``` 16 | flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled 17 | 18 | linkage = ENV['USE_FRAMEWORKS'] 19 | if linkage != nil 20 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green 21 | use_frameworks! :linkage => linkage.to_sym 22 | end 23 | 24 | target 'RustInReactNativeDemo' do 25 | config = use_native_modules! 26 | 27 | # Flags change depending on the env values. 28 | flags = get_default_flags() 29 | 30 | use_react_native!( 31 | :path => config[:reactNativePath], 32 | # Hermes is now enabled by default. Disable by setting this flag to false. 33 | # Upcoming versions of React Native may rely on get_default_flags(), but 34 | # we make it explicit here to aid in the React Native upgrade process. 35 | :hermes_enabled => flags[:hermes_enabled], 36 | :fabric_enabled => flags[:fabric_enabled], 37 | # Enables Flipper. 38 | # 39 | # Note that if you have use_frameworks! enabled, Flipper will not work and 40 | # you should disable the next line. 41 | :flipper_configuration => flipper_config, 42 | # An absolute path to your application root. 43 | :app_path => "#{Pod::Config.instance.installation_root}/.." 44 | ) 45 | 46 | if ENV['RCT_NEW_ARCH_ENABLED'] == '1' 47 | pod 'AppTurboModules', :path => "./../tm" 48 | end 49 | 50 | target 'RustInReactNativeDemoTests' do 51 | inherit! :complete 52 | # Pods for testing 53 | end 54 | 55 | post_install do |installer| 56 | react_native_post_install( 57 | installer, 58 | # Set `mac_catalyst_enabled` to `true` in order to apply patches 59 | # necessary for Mac Catalyst builds 60 | :mac_catalyst_enabled => false 61 | ) 62 | __apply_Xcode_12_5_M1_post_install_workaround(installer) 63 | 64 | installer.pods_project.build_configurations.each do |config| 65 | config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386' 66 | end 67 | end 68 | end 69 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AppTurboModules (0.0.1): 3 | - RCT-Folly (= 2021.07.22.00) 4 | - RCTRequired 5 | - RCTTypeSafety 6 | - React-Codegen 7 | - React-Core 8 | - React-RCTFabric 9 | - ReactCommon/turbomodule/bridging 10 | - ReactCommon/turbomodule/core 11 | - boost (1.76.0) 12 | - CocoaAsyncSocket (7.6.5) 13 | - DoubleConversion (1.1.6) 14 | - FBLazyVector (0.71.7) 15 | - FBReactNativeSpec (0.71.7): 16 | - RCT-Folly (= 2021.07.22.00) 17 | - RCTRequired (= 0.71.7) 18 | - RCTTypeSafety (= 0.71.7) 19 | - React-Core (= 0.71.7) 20 | - React-jsi (= 0.71.7) 21 | - ReactCommon/turbomodule/core (= 0.71.7) 22 | - Flipper (0.125.0): 23 | - Flipper-Folly (~> 2.6) 24 | - Flipper-RSocket (~> 1.4) 25 | - Flipper-Boost-iOSX (1.76.0.1.11) 26 | - Flipper-DoubleConversion (3.2.0.1) 27 | - Flipper-Fmt (7.1.7) 28 | - Flipper-Folly (2.6.10): 29 | - Flipper-Boost-iOSX 30 | - Flipper-DoubleConversion 31 | - Flipper-Fmt (= 7.1.7) 32 | - Flipper-Glog 33 | - libevent (~> 2.1.12) 34 | - OpenSSL-Universal (= 1.1.1100) 35 | - Flipper-Glog (0.5.0.5) 36 | - Flipper-PeerTalk (0.0.4) 37 | - Flipper-RSocket (1.4.3): 38 | - Flipper-Folly (~> 2.6) 39 | - FlipperKit (0.125.0): 40 | - FlipperKit/Core (= 0.125.0) 41 | - FlipperKit/Core (0.125.0): 42 | - Flipper (~> 0.125.0) 43 | - FlipperKit/CppBridge 44 | - FlipperKit/FBCxxFollyDynamicConvert 45 | - FlipperKit/FBDefines 46 | - FlipperKit/FKPortForwarding 47 | - SocketRocket (~> 0.6.0) 48 | - FlipperKit/CppBridge (0.125.0): 49 | - Flipper (~> 0.125.0) 50 | - FlipperKit/FBCxxFollyDynamicConvert (0.125.0): 51 | - Flipper-Folly (~> 2.6) 52 | - FlipperKit/FBDefines (0.125.0) 53 | - FlipperKit/FKPortForwarding (0.125.0): 54 | - CocoaAsyncSocket (~> 7.6) 55 | - Flipper-PeerTalk (~> 0.0.4) 56 | - FlipperKit/FlipperKitHighlightOverlay (0.125.0) 57 | - FlipperKit/FlipperKitLayoutHelpers (0.125.0): 58 | - FlipperKit/Core 59 | - FlipperKit/FlipperKitHighlightOverlay 60 | - FlipperKit/FlipperKitLayoutTextSearchable 61 | - FlipperKit/FlipperKitLayoutIOSDescriptors (0.125.0): 62 | - FlipperKit/Core 63 | - FlipperKit/FlipperKitHighlightOverlay 64 | - FlipperKit/FlipperKitLayoutHelpers 65 | - YogaKit (~> 1.18) 66 | - FlipperKit/FlipperKitLayoutPlugin (0.125.0): 67 | - FlipperKit/Core 68 | - FlipperKit/FlipperKitHighlightOverlay 69 | - FlipperKit/FlipperKitLayoutHelpers 70 | - FlipperKit/FlipperKitLayoutIOSDescriptors 71 | - FlipperKit/FlipperKitLayoutTextSearchable 72 | - YogaKit (~> 1.18) 73 | - FlipperKit/FlipperKitLayoutTextSearchable (0.125.0) 74 | - FlipperKit/FlipperKitNetworkPlugin (0.125.0): 75 | - FlipperKit/Core 76 | - FlipperKit/FlipperKitReactPlugin (0.125.0): 77 | - FlipperKit/Core 78 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.125.0): 79 | - FlipperKit/Core 80 | - FlipperKit/SKIOSNetworkPlugin (0.125.0): 81 | - FlipperKit/Core 82 | - FlipperKit/FlipperKitNetworkPlugin 83 | - fmt (6.2.1) 84 | - glog (0.3.5) 85 | - hermes-engine (0.71.7): 86 | - hermes-engine/Pre-built (= 0.71.7) 87 | - hermes-engine/Pre-built (0.71.7) 88 | - libevent (2.1.12) 89 | - OpenSSL-Universal (1.1.1100) 90 | - RCT-Folly (2021.07.22.00): 91 | - boost 92 | - DoubleConversion 93 | - fmt (~> 6.2.1) 94 | - glog 95 | - RCT-Folly/Default (= 2021.07.22.00) 96 | - RCT-Folly/Default (2021.07.22.00): 97 | - boost 98 | - DoubleConversion 99 | - fmt (~> 6.2.1) 100 | - glog 101 | - RCT-Folly/Fabric (2021.07.22.00): 102 | - boost 103 | - DoubleConversion 104 | - fmt (~> 6.2.1) 105 | - glog 106 | - RCT-Folly/Futures (2021.07.22.00): 107 | - boost 108 | - DoubleConversion 109 | - fmt (~> 6.2.1) 110 | - glog 111 | - libevent 112 | - RCTRequired (0.71.7) 113 | - RCTTypeSafety (0.71.7): 114 | - FBLazyVector (= 0.71.7) 115 | - RCTRequired (= 0.71.7) 116 | - React-Core (= 0.71.7) 117 | - React (0.71.7): 118 | - React-Core (= 0.71.7) 119 | - React-Core/DevSupport (= 0.71.7) 120 | - React-Core/RCTWebSocket (= 0.71.7) 121 | - React-RCTActionSheet (= 0.71.7) 122 | - React-RCTAnimation (= 0.71.7) 123 | - React-RCTBlob (= 0.71.7) 124 | - React-RCTImage (= 0.71.7) 125 | - React-RCTLinking (= 0.71.7) 126 | - React-RCTNetwork (= 0.71.7) 127 | - React-RCTSettings (= 0.71.7) 128 | - React-RCTText (= 0.71.7) 129 | - React-RCTVibration (= 0.71.7) 130 | - React-callinvoker (0.71.7) 131 | - React-Codegen (0.71.7): 132 | - FBReactNativeSpec 133 | - hermes-engine 134 | - RCT-Folly 135 | - RCTRequired 136 | - RCTTypeSafety 137 | - React-Core 138 | - React-graphics 139 | - React-jsi 140 | - React-jsiexecutor 141 | - React-rncore 142 | - ReactCommon/turbomodule/bridging 143 | - ReactCommon/turbomodule/core 144 | - React-Core (0.71.7): 145 | - glog 146 | - hermes-engine 147 | - RCT-Folly (= 2021.07.22.00) 148 | - React-Core/Default (= 0.71.7) 149 | - React-cxxreact (= 0.71.7) 150 | - React-hermes 151 | - React-jsi (= 0.71.7) 152 | - React-jsiexecutor (= 0.71.7) 153 | - React-perflogger (= 0.71.7) 154 | - Yoga 155 | - React-Core/CoreModulesHeaders (0.71.7): 156 | - glog 157 | - hermes-engine 158 | - RCT-Folly (= 2021.07.22.00) 159 | - React-Core/Default 160 | - React-cxxreact (= 0.71.7) 161 | - React-hermes 162 | - React-jsi (= 0.71.7) 163 | - React-jsiexecutor (= 0.71.7) 164 | - React-perflogger (= 0.71.7) 165 | - Yoga 166 | - React-Core/Default (0.71.7): 167 | - glog 168 | - hermes-engine 169 | - RCT-Folly (= 2021.07.22.00) 170 | - React-cxxreact (= 0.71.7) 171 | - React-hermes 172 | - React-jsi (= 0.71.7) 173 | - React-jsiexecutor (= 0.71.7) 174 | - React-perflogger (= 0.71.7) 175 | - Yoga 176 | - React-Core/DevSupport (0.71.7): 177 | - glog 178 | - hermes-engine 179 | - RCT-Folly (= 2021.07.22.00) 180 | - React-Core/Default (= 0.71.7) 181 | - React-Core/RCTWebSocket (= 0.71.7) 182 | - React-cxxreact (= 0.71.7) 183 | - React-hermes 184 | - React-jsi (= 0.71.7) 185 | - React-jsiexecutor (= 0.71.7) 186 | - React-jsinspector (= 0.71.7) 187 | - React-perflogger (= 0.71.7) 188 | - Yoga 189 | - React-Core/RCTActionSheetHeaders (0.71.7): 190 | - glog 191 | - hermes-engine 192 | - RCT-Folly (= 2021.07.22.00) 193 | - React-Core/Default 194 | - React-cxxreact (= 0.71.7) 195 | - React-hermes 196 | - React-jsi (= 0.71.7) 197 | - React-jsiexecutor (= 0.71.7) 198 | - React-perflogger (= 0.71.7) 199 | - Yoga 200 | - React-Core/RCTAnimationHeaders (0.71.7): 201 | - glog 202 | - hermes-engine 203 | - RCT-Folly (= 2021.07.22.00) 204 | - React-Core/Default 205 | - React-cxxreact (= 0.71.7) 206 | - React-hermes 207 | - React-jsi (= 0.71.7) 208 | - React-jsiexecutor (= 0.71.7) 209 | - React-perflogger (= 0.71.7) 210 | - Yoga 211 | - React-Core/RCTBlobHeaders (0.71.7): 212 | - glog 213 | - hermes-engine 214 | - RCT-Folly (= 2021.07.22.00) 215 | - React-Core/Default 216 | - React-cxxreact (= 0.71.7) 217 | - React-hermes 218 | - React-jsi (= 0.71.7) 219 | - React-jsiexecutor (= 0.71.7) 220 | - React-perflogger (= 0.71.7) 221 | - Yoga 222 | - React-Core/RCTImageHeaders (0.71.7): 223 | - glog 224 | - hermes-engine 225 | - RCT-Folly (= 2021.07.22.00) 226 | - React-Core/Default 227 | - React-cxxreact (= 0.71.7) 228 | - React-hermes 229 | - React-jsi (= 0.71.7) 230 | - React-jsiexecutor (= 0.71.7) 231 | - React-perflogger (= 0.71.7) 232 | - Yoga 233 | - React-Core/RCTLinkingHeaders (0.71.7): 234 | - glog 235 | - hermes-engine 236 | - RCT-Folly (= 2021.07.22.00) 237 | - React-Core/Default 238 | - React-cxxreact (= 0.71.7) 239 | - React-hermes 240 | - React-jsi (= 0.71.7) 241 | - React-jsiexecutor (= 0.71.7) 242 | - React-perflogger (= 0.71.7) 243 | - Yoga 244 | - React-Core/RCTNetworkHeaders (0.71.7): 245 | - glog 246 | - hermes-engine 247 | - RCT-Folly (= 2021.07.22.00) 248 | - React-Core/Default 249 | - React-cxxreact (= 0.71.7) 250 | - React-hermes 251 | - React-jsi (= 0.71.7) 252 | - React-jsiexecutor (= 0.71.7) 253 | - React-perflogger (= 0.71.7) 254 | - Yoga 255 | - React-Core/RCTSettingsHeaders (0.71.7): 256 | - glog 257 | - hermes-engine 258 | - RCT-Folly (= 2021.07.22.00) 259 | - React-Core/Default 260 | - React-cxxreact (= 0.71.7) 261 | - React-hermes 262 | - React-jsi (= 0.71.7) 263 | - React-jsiexecutor (= 0.71.7) 264 | - React-perflogger (= 0.71.7) 265 | - Yoga 266 | - React-Core/RCTTextHeaders (0.71.7): 267 | - glog 268 | - hermes-engine 269 | - RCT-Folly (= 2021.07.22.00) 270 | - React-Core/Default 271 | - React-cxxreact (= 0.71.7) 272 | - React-hermes 273 | - React-jsi (= 0.71.7) 274 | - React-jsiexecutor (= 0.71.7) 275 | - React-perflogger (= 0.71.7) 276 | - Yoga 277 | - React-Core/RCTVibrationHeaders (0.71.7): 278 | - glog 279 | - hermes-engine 280 | - RCT-Folly (= 2021.07.22.00) 281 | - React-Core/Default 282 | - React-cxxreact (= 0.71.7) 283 | - React-hermes 284 | - React-jsi (= 0.71.7) 285 | - React-jsiexecutor (= 0.71.7) 286 | - React-perflogger (= 0.71.7) 287 | - Yoga 288 | - React-Core/RCTWebSocket (0.71.7): 289 | - glog 290 | - hermes-engine 291 | - RCT-Folly (= 2021.07.22.00) 292 | - React-Core/Default (= 0.71.7) 293 | - React-cxxreact (= 0.71.7) 294 | - React-hermes 295 | - React-jsi (= 0.71.7) 296 | - React-jsiexecutor (= 0.71.7) 297 | - React-perflogger (= 0.71.7) 298 | - Yoga 299 | - React-CoreModules (0.71.7): 300 | - RCT-Folly (= 2021.07.22.00) 301 | - RCTTypeSafety (= 0.71.7) 302 | - React-Codegen (= 0.71.7) 303 | - React-Core/CoreModulesHeaders (= 0.71.7) 304 | - React-jsi (= 0.71.7) 305 | - React-RCTBlob 306 | - React-RCTImage (= 0.71.7) 307 | - ReactCommon/turbomodule/core (= 0.71.7) 308 | - React-cxxreact (0.71.7): 309 | - boost (= 1.76.0) 310 | - DoubleConversion 311 | - glog 312 | - hermes-engine 313 | - RCT-Folly (= 2021.07.22.00) 314 | - React-callinvoker (= 0.71.7) 315 | - React-jsi (= 0.71.7) 316 | - React-jsinspector (= 0.71.7) 317 | - React-logger (= 0.71.7) 318 | - React-perflogger (= 0.71.7) 319 | - React-runtimeexecutor (= 0.71.7) 320 | - React-Fabric (0.71.7): 321 | - RCT-Folly/Fabric (= 2021.07.22.00) 322 | - RCTRequired (= 0.71.7) 323 | - RCTTypeSafety (= 0.71.7) 324 | - React-Fabric/animations (= 0.71.7) 325 | - React-Fabric/attributedstring (= 0.71.7) 326 | - React-Fabric/butter (= 0.71.7) 327 | - React-Fabric/componentregistry (= 0.71.7) 328 | - React-Fabric/componentregistrynative (= 0.71.7) 329 | - React-Fabric/components (= 0.71.7) 330 | - React-Fabric/config (= 0.71.7) 331 | - React-Fabric/core (= 0.71.7) 332 | - React-Fabric/debug_core (= 0.71.7) 333 | - React-Fabric/debug_renderer (= 0.71.7) 334 | - React-Fabric/imagemanager (= 0.71.7) 335 | - React-Fabric/leakchecker (= 0.71.7) 336 | - React-Fabric/mapbuffer (= 0.71.7) 337 | - React-Fabric/mounting (= 0.71.7) 338 | - React-Fabric/runtimescheduler (= 0.71.7) 339 | - React-Fabric/scheduler (= 0.71.7) 340 | - React-Fabric/telemetry (= 0.71.7) 341 | - React-Fabric/templateprocessor (= 0.71.7) 342 | - React-Fabric/textlayoutmanager (= 0.71.7) 343 | - React-Fabric/uimanager (= 0.71.7) 344 | - React-Fabric/utils (= 0.71.7) 345 | - React-graphics (= 0.71.7) 346 | - React-jsi (= 0.71.7) 347 | - React-jsiexecutor (= 0.71.7) 348 | - ReactCommon/turbomodule/core (= 0.71.7) 349 | - React-Fabric/animations (0.71.7): 350 | - RCT-Folly/Fabric (= 2021.07.22.00) 351 | - RCTRequired (= 0.71.7) 352 | - RCTTypeSafety (= 0.71.7) 353 | - React-graphics (= 0.71.7) 354 | - React-jsi (= 0.71.7) 355 | - React-jsiexecutor (= 0.71.7) 356 | - ReactCommon/turbomodule/core (= 0.71.7) 357 | - React-Fabric/attributedstring (0.71.7): 358 | - RCT-Folly/Fabric (= 2021.07.22.00) 359 | - RCTRequired (= 0.71.7) 360 | - RCTTypeSafety (= 0.71.7) 361 | - React-graphics (= 0.71.7) 362 | - React-jsi (= 0.71.7) 363 | - React-jsiexecutor (= 0.71.7) 364 | - ReactCommon/turbomodule/core (= 0.71.7) 365 | - React-Fabric/butter (0.71.7): 366 | - RCT-Folly/Fabric (= 2021.07.22.00) 367 | - RCTRequired (= 0.71.7) 368 | - RCTTypeSafety (= 0.71.7) 369 | - React-graphics (= 0.71.7) 370 | - React-jsi (= 0.71.7) 371 | - React-jsiexecutor (= 0.71.7) 372 | - ReactCommon/turbomodule/core (= 0.71.7) 373 | - React-Fabric/componentregistry (0.71.7): 374 | - RCT-Folly/Fabric (= 2021.07.22.00) 375 | - RCTRequired (= 0.71.7) 376 | - RCTTypeSafety (= 0.71.7) 377 | - React-graphics (= 0.71.7) 378 | - React-jsi (= 0.71.7) 379 | - React-jsiexecutor (= 0.71.7) 380 | - ReactCommon/turbomodule/core (= 0.71.7) 381 | - React-Fabric/componentregistrynative (0.71.7): 382 | - RCT-Folly/Fabric (= 2021.07.22.00) 383 | - RCTRequired (= 0.71.7) 384 | - RCTTypeSafety (= 0.71.7) 385 | - React-graphics (= 0.71.7) 386 | - React-jsi (= 0.71.7) 387 | - React-jsiexecutor (= 0.71.7) 388 | - ReactCommon/turbomodule/core (= 0.71.7) 389 | - React-Fabric/components (0.71.7): 390 | - RCT-Folly/Fabric (= 2021.07.22.00) 391 | - RCTRequired (= 0.71.7) 392 | - RCTTypeSafety (= 0.71.7) 393 | - React-Fabric/components/activityindicator (= 0.71.7) 394 | - React-Fabric/components/image (= 0.71.7) 395 | - React-Fabric/components/inputaccessory (= 0.71.7) 396 | - React-Fabric/components/legacyviewmanagerinterop (= 0.71.7) 397 | - React-Fabric/components/modal (= 0.71.7) 398 | - React-Fabric/components/root (= 0.71.7) 399 | - React-Fabric/components/safeareaview (= 0.71.7) 400 | - React-Fabric/components/scrollview (= 0.71.7) 401 | - React-Fabric/components/slider (= 0.71.7) 402 | - React-Fabric/components/text (= 0.71.7) 403 | - React-Fabric/components/textinput (= 0.71.7) 404 | - React-Fabric/components/unimplementedview (= 0.71.7) 405 | - React-Fabric/components/view (= 0.71.7) 406 | - React-graphics (= 0.71.7) 407 | - React-jsi (= 0.71.7) 408 | - React-jsiexecutor (= 0.71.7) 409 | - ReactCommon/turbomodule/core (= 0.71.7) 410 | - React-Fabric/components/activityindicator (0.71.7): 411 | - RCT-Folly/Fabric (= 2021.07.22.00) 412 | - RCTRequired (= 0.71.7) 413 | - RCTTypeSafety (= 0.71.7) 414 | - React-graphics (= 0.71.7) 415 | - React-jsi (= 0.71.7) 416 | - React-jsiexecutor (= 0.71.7) 417 | - ReactCommon/turbomodule/core (= 0.71.7) 418 | - React-Fabric/components/image (0.71.7): 419 | - RCT-Folly/Fabric (= 2021.07.22.00) 420 | - RCTRequired (= 0.71.7) 421 | - RCTTypeSafety (= 0.71.7) 422 | - React-graphics (= 0.71.7) 423 | - React-jsi (= 0.71.7) 424 | - React-jsiexecutor (= 0.71.7) 425 | - ReactCommon/turbomodule/core (= 0.71.7) 426 | - React-Fabric/components/inputaccessory (0.71.7): 427 | - RCT-Folly/Fabric (= 2021.07.22.00) 428 | - RCTRequired (= 0.71.7) 429 | - RCTTypeSafety (= 0.71.7) 430 | - React-graphics (= 0.71.7) 431 | - React-jsi (= 0.71.7) 432 | - React-jsiexecutor (= 0.71.7) 433 | - ReactCommon/turbomodule/core (= 0.71.7) 434 | - React-Fabric/components/legacyviewmanagerinterop (0.71.7): 435 | - RCT-Folly/Fabric (= 2021.07.22.00) 436 | - RCTRequired (= 0.71.7) 437 | - RCTTypeSafety (= 0.71.7) 438 | - React-graphics (= 0.71.7) 439 | - React-jsi (= 0.71.7) 440 | - React-jsiexecutor (= 0.71.7) 441 | - ReactCommon/turbomodule/core (= 0.71.7) 442 | - React-Fabric/components/modal (0.71.7): 443 | - RCT-Folly/Fabric (= 2021.07.22.00) 444 | - RCTRequired (= 0.71.7) 445 | - RCTTypeSafety (= 0.71.7) 446 | - React-graphics (= 0.71.7) 447 | - React-jsi (= 0.71.7) 448 | - React-jsiexecutor (= 0.71.7) 449 | - ReactCommon/turbomodule/core (= 0.71.7) 450 | - React-Fabric/components/root (0.71.7): 451 | - RCT-Folly/Fabric (= 2021.07.22.00) 452 | - RCTRequired (= 0.71.7) 453 | - RCTTypeSafety (= 0.71.7) 454 | - React-graphics (= 0.71.7) 455 | - React-jsi (= 0.71.7) 456 | - React-jsiexecutor (= 0.71.7) 457 | - ReactCommon/turbomodule/core (= 0.71.7) 458 | - React-Fabric/components/safeareaview (0.71.7): 459 | - RCT-Folly/Fabric (= 2021.07.22.00) 460 | - RCTRequired (= 0.71.7) 461 | - RCTTypeSafety (= 0.71.7) 462 | - React-graphics (= 0.71.7) 463 | - React-jsi (= 0.71.7) 464 | - React-jsiexecutor (= 0.71.7) 465 | - ReactCommon/turbomodule/core (= 0.71.7) 466 | - React-Fabric/components/scrollview (0.71.7): 467 | - RCT-Folly/Fabric (= 2021.07.22.00) 468 | - RCTRequired (= 0.71.7) 469 | - RCTTypeSafety (= 0.71.7) 470 | - React-graphics (= 0.71.7) 471 | - React-jsi (= 0.71.7) 472 | - React-jsiexecutor (= 0.71.7) 473 | - ReactCommon/turbomodule/core (= 0.71.7) 474 | - React-Fabric/components/slider (0.71.7): 475 | - RCT-Folly/Fabric (= 2021.07.22.00) 476 | - RCTRequired (= 0.71.7) 477 | - RCTTypeSafety (= 0.71.7) 478 | - React-graphics (= 0.71.7) 479 | - React-jsi (= 0.71.7) 480 | - React-jsiexecutor (= 0.71.7) 481 | - ReactCommon/turbomodule/core (= 0.71.7) 482 | - React-Fabric/components/text (0.71.7): 483 | - RCT-Folly/Fabric (= 2021.07.22.00) 484 | - RCTRequired (= 0.71.7) 485 | - RCTTypeSafety (= 0.71.7) 486 | - React-graphics (= 0.71.7) 487 | - React-jsi (= 0.71.7) 488 | - React-jsiexecutor (= 0.71.7) 489 | - ReactCommon/turbomodule/core (= 0.71.7) 490 | - React-Fabric/components/textinput (0.71.7): 491 | - RCT-Folly/Fabric (= 2021.07.22.00) 492 | - RCTRequired (= 0.71.7) 493 | - RCTTypeSafety (= 0.71.7) 494 | - React-graphics (= 0.71.7) 495 | - React-jsi (= 0.71.7) 496 | - React-jsiexecutor (= 0.71.7) 497 | - ReactCommon/turbomodule/core (= 0.71.7) 498 | - React-Fabric/components/unimplementedview (0.71.7): 499 | - RCT-Folly/Fabric (= 2021.07.22.00) 500 | - RCTRequired (= 0.71.7) 501 | - RCTTypeSafety (= 0.71.7) 502 | - React-graphics (= 0.71.7) 503 | - React-jsi (= 0.71.7) 504 | - React-jsiexecutor (= 0.71.7) 505 | - ReactCommon/turbomodule/core (= 0.71.7) 506 | - React-Fabric/components/view (0.71.7): 507 | - RCT-Folly/Fabric (= 2021.07.22.00) 508 | - RCTRequired (= 0.71.7) 509 | - RCTTypeSafety (= 0.71.7) 510 | - React-graphics (= 0.71.7) 511 | - React-jsi (= 0.71.7) 512 | - React-jsiexecutor (= 0.71.7) 513 | - ReactCommon/turbomodule/core (= 0.71.7) 514 | - Yoga 515 | - React-Fabric/config (0.71.7): 516 | - RCT-Folly/Fabric (= 2021.07.22.00) 517 | - RCTRequired (= 0.71.7) 518 | - RCTTypeSafety (= 0.71.7) 519 | - React-graphics (= 0.71.7) 520 | - React-jsi (= 0.71.7) 521 | - React-jsiexecutor (= 0.71.7) 522 | - ReactCommon/turbomodule/core (= 0.71.7) 523 | - React-Fabric/core (0.71.7): 524 | - RCT-Folly/Fabric (= 2021.07.22.00) 525 | - RCTRequired (= 0.71.7) 526 | - RCTTypeSafety (= 0.71.7) 527 | - React-graphics (= 0.71.7) 528 | - React-jsi (= 0.71.7) 529 | - React-jsiexecutor (= 0.71.7) 530 | - ReactCommon/turbomodule/core (= 0.71.7) 531 | - React-Fabric/debug_core (0.71.7): 532 | - RCT-Folly/Fabric (= 2021.07.22.00) 533 | - RCTRequired (= 0.71.7) 534 | - RCTTypeSafety (= 0.71.7) 535 | - React-graphics (= 0.71.7) 536 | - React-jsi (= 0.71.7) 537 | - React-jsiexecutor (= 0.71.7) 538 | - ReactCommon/turbomodule/core (= 0.71.7) 539 | - React-Fabric/debug_renderer (0.71.7): 540 | - RCT-Folly/Fabric (= 2021.07.22.00) 541 | - RCTRequired (= 0.71.7) 542 | - RCTTypeSafety (= 0.71.7) 543 | - React-graphics (= 0.71.7) 544 | - React-jsi (= 0.71.7) 545 | - React-jsiexecutor (= 0.71.7) 546 | - ReactCommon/turbomodule/core (= 0.71.7) 547 | - React-Fabric/imagemanager (0.71.7): 548 | - RCT-Folly/Fabric (= 2021.07.22.00) 549 | - RCTRequired (= 0.71.7) 550 | - RCTTypeSafety (= 0.71.7) 551 | - React-graphics (= 0.71.7) 552 | - React-jsi (= 0.71.7) 553 | - React-jsiexecutor (= 0.71.7) 554 | - React-RCTImage (= 0.71.7) 555 | - ReactCommon/turbomodule/core (= 0.71.7) 556 | - React-Fabric/leakchecker (0.71.7): 557 | - RCT-Folly/Fabric (= 2021.07.22.00) 558 | - RCTRequired (= 0.71.7) 559 | - RCTTypeSafety (= 0.71.7) 560 | - React-graphics (= 0.71.7) 561 | - React-jsi (= 0.71.7) 562 | - React-jsiexecutor (= 0.71.7) 563 | - ReactCommon/turbomodule/core (= 0.71.7) 564 | - React-Fabric/mapbuffer (0.71.7): 565 | - RCT-Folly/Fabric (= 2021.07.22.00) 566 | - RCTRequired (= 0.71.7) 567 | - RCTTypeSafety (= 0.71.7) 568 | - React-graphics (= 0.71.7) 569 | - React-jsi (= 0.71.7) 570 | - React-jsiexecutor (= 0.71.7) 571 | - ReactCommon/turbomodule/core (= 0.71.7) 572 | - React-Fabric/mounting (0.71.7): 573 | - RCT-Folly/Fabric (= 2021.07.22.00) 574 | - RCTRequired (= 0.71.7) 575 | - RCTTypeSafety (= 0.71.7) 576 | - React-graphics (= 0.71.7) 577 | - React-jsi (= 0.71.7) 578 | - React-jsiexecutor (= 0.71.7) 579 | - ReactCommon/turbomodule/core (= 0.71.7) 580 | - React-Fabric/runtimescheduler (0.71.7): 581 | - RCT-Folly/Fabric (= 2021.07.22.00) 582 | - RCTRequired (= 0.71.7) 583 | - RCTTypeSafety (= 0.71.7) 584 | - React-graphics (= 0.71.7) 585 | - React-jsi (= 0.71.7) 586 | - React-jsiexecutor (= 0.71.7) 587 | - ReactCommon/turbomodule/core (= 0.71.7) 588 | - React-Fabric/scheduler (0.71.7): 589 | - RCT-Folly/Fabric (= 2021.07.22.00) 590 | - RCTRequired (= 0.71.7) 591 | - RCTTypeSafety (= 0.71.7) 592 | - React-graphics (= 0.71.7) 593 | - React-jsi (= 0.71.7) 594 | - React-jsiexecutor (= 0.71.7) 595 | - ReactCommon/turbomodule/core (= 0.71.7) 596 | - React-Fabric/telemetry (0.71.7): 597 | - RCT-Folly/Fabric (= 2021.07.22.00) 598 | - RCTRequired (= 0.71.7) 599 | - RCTTypeSafety (= 0.71.7) 600 | - React-graphics (= 0.71.7) 601 | - React-jsi (= 0.71.7) 602 | - React-jsiexecutor (= 0.71.7) 603 | - ReactCommon/turbomodule/core (= 0.71.7) 604 | - React-Fabric/templateprocessor (0.71.7): 605 | - RCT-Folly/Fabric (= 2021.07.22.00) 606 | - RCTRequired (= 0.71.7) 607 | - RCTTypeSafety (= 0.71.7) 608 | - React-graphics (= 0.71.7) 609 | - React-jsi (= 0.71.7) 610 | - React-jsiexecutor (= 0.71.7) 611 | - ReactCommon/turbomodule/core (= 0.71.7) 612 | - React-Fabric/textlayoutmanager (0.71.7): 613 | - RCT-Folly/Fabric (= 2021.07.22.00) 614 | - RCTRequired (= 0.71.7) 615 | - RCTTypeSafety (= 0.71.7) 616 | - React-Fabric/uimanager 617 | - React-graphics (= 0.71.7) 618 | - React-jsi (= 0.71.7) 619 | - React-jsiexecutor (= 0.71.7) 620 | - ReactCommon/turbomodule/core (= 0.71.7) 621 | - React-Fabric/uimanager (0.71.7): 622 | - RCT-Folly/Fabric (= 2021.07.22.00) 623 | - RCTRequired (= 0.71.7) 624 | - RCTTypeSafety (= 0.71.7) 625 | - React-graphics (= 0.71.7) 626 | - React-jsi (= 0.71.7) 627 | - React-jsiexecutor (= 0.71.7) 628 | - ReactCommon/turbomodule/core (= 0.71.7) 629 | - React-Fabric/utils (0.71.7): 630 | - RCT-Folly/Fabric (= 2021.07.22.00) 631 | - RCTRequired (= 0.71.7) 632 | - RCTTypeSafety (= 0.71.7) 633 | - React-graphics (= 0.71.7) 634 | - React-jsi (= 0.71.7) 635 | - React-jsiexecutor (= 0.71.7) 636 | - ReactCommon/turbomodule/core (= 0.71.7) 637 | - React-graphics (0.71.7): 638 | - RCT-Folly/Fabric (= 2021.07.22.00) 639 | - React-Core/Default (= 0.71.7) 640 | - React-hermes (0.71.7): 641 | - DoubleConversion 642 | - glog 643 | - hermes-engine 644 | - RCT-Folly (= 2021.07.22.00) 645 | - RCT-Folly/Futures (= 2021.07.22.00) 646 | - React-cxxreact (= 0.71.7) 647 | - React-jsi 648 | - React-jsiexecutor (= 0.71.7) 649 | - React-jsinspector (= 0.71.7) 650 | - React-perflogger (= 0.71.7) 651 | - React-jsi (0.71.7): 652 | - boost (= 1.76.0) 653 | - DoubleConversion 654 | - glog 655 | - hermes-engine 656 | - RCT-Folly (= 2021.07.22.00) 657 | - React-jsiexecutor (0.71.7): 658 | - DoubleConversion 659 | - glog 660 | - hermes-engine 661 | - RCT-Folly (= 2021.07.22.00) 662 | - React-cxxreact (= 0.71.7) 663 | - React-jsi (= 0.71.7) 664 | - React-perflogger (= 0.71.7) 665 | - React-jsinspector (0.71.7) 666 | - React-logger (0.71.7): 667 | - glog 668 | - React-perflogger (0.71.7) 669 | - React-RCTActionSheet (0.71.7): 670 | - React-Core/RCTActionSheetHeaders (= 0.71.7) 671 | - React-RCTAnimation (0.71.7): 672 | - RCT-Folly (= 2021.07.22.00) 673 | - RCTTypeSafety (= 0.71.7) 674 | - React-Codegen (= 0.71.7) 675 | - React-Core/RCTAnimationHeaders (= 0.71.7) 676 | - React-jsi (= 0.71.7) 677 | - ReactCommon/turbomodule/core (= 0.71.7) 678 | - React-RCTAppDelegate (0.71.7): 679 | - RCT-Folly 680 | - RCTRequired 681 | - RCTTypeSafety 682 | - React-Core 683 | - React-graphics 684 | - React-RCTFabric 685 | - ReactCommon/turbomodule/core 686 | - React-RCTBlob (0.71.7): 687 | - hermes-engine 688 | - RCT-Folly (= 2021.07.22.00) 689 | - React-Codegen (= 0.71.7) 690 | - React-Core/RCTBlobHeaders (= 0.71.7) 691 | - React-Core/RCTWebSocket (= 0.71.7) 692 | - React-jsi (= 0.71.7) 693 | - React-RCTNetwork (= 0.71.7) 694 | - ReactCommon/turbomodule/core (= 0.71.7) 695 | - React-RCTFabric (0.71.7): 696 | - RCT-Folly/Fabric (= 2021.07.22.00) 697 | - React-Core (= 0.71.7) 698 | - React-Fabric (= 0.71.7) 699 | - React-RCTImage (= 0.71.7) 700 | - React-RCTImage (0.71.7): 701 | - RCT-Folly (= 2021.07.22.00) 702 | - RCTTypeSafety (= 0.71.7) 703 | - React-Codegen (= 0.71.7) 704 | - React-Core/RCTImageHeaders (= 0.71.7) 705 | - React-jsi (= 0.71.7) 706 | - React-RCTNetwork (= 0.71.7) 707 | - ReactCommon/turbomodule/core (= 0.71.7) 708 | - React-RCTLinking (0.71.7): 709 | - React-Codegen (= 0.71.7) 710 | - React-Core/RCTLinkingHeaders (= 0.71.7) 711 | - React-jsi (= 0.71.7) 712 | - ReactCommon/turbomodule/core (= 0.71.7) 713 | - React-RCTNetwork (0.71.7): 714 | - RCT-Folly (= 2021.07.22.00) 715 | - RCTTypeSafety (= 0.71.7) 716 | - React-Codegen (= 0.71.7) 717 | - React-Core/RCTNetworkHeaders (= 0.71.7) 718 | - React-jsi (= 0.71.7) 719 | - ReactCommon/turbomodule/core (= 0.71.7) 720 | - React-RCTSettings (0.71.7): 721 | - RCT-Folly (= 2021.07.22.00) 722 | - RCTTypeSafety (= 0.71.7) 723 | - React-Codegen (= 0.71.7) 724 | - React-Core/RCTSettingsHeaders (= 0.71.7) 725 | - React-jsi (= 0.71.7) 726 | - ReactCommon/turbomodule/core (= 0.71.7) 727 | - React-RCTText (0.71.7): 728 | - React-Core/RCTTextHeaders (= 0.71.7) 729 | - React-RCTVibration (0.71.7): 730 | - RCT-Folly (= 2021.07.22.00) 731 | - React-Codegen (= 0.71.7) 732 | - React-Core/RCTVibrationHeaders (= 0.71.7) 733 | - React-jsi (= 0.71.7) 734 | - ReactCommon/turbomodule/core (= 0.71.7) 735 | - React-rncore (0.71.7) 736 | - React-runtimeexecutor (0.71.7): 737 | - React-jsi (= 0.71.7) 738 | - ReactCommon/turbomodule/bridging (0.71.7): 739 | - DoubleConversion 740 | - glog 741 | - hermes-engine 742 | - RCT-Folly (= 2021.07.22.00) 743 | - React-callinvoker (= 0.71.7) 744 | - React-Core (= 0.71.7) 745 | - React-cxxreact (= 0.71.7) 746 | - React-jsi (= 0.71.7) 747 | - React-logger (= 0.71.7) 748 | - React-perflogger (= 0.71.7) 749 | - ReactCommon/turbomodule/core (0.71.7): 750 | - DoubleConversion 751 | - glog 752 | - hermes-engine 753 | - RCT-Folly (= 2021.07.22.00) 754 | - React-callinvoker (= 0.71.7) 755 | - React-Core (= 0.71.7) 756 | - React-cxxreact (= 0.71.7) 757 | - React-jsi (= 0.71.7) 758 | - React-logger (= 0.71.7) 759 | - React-perflogger (= 0.71.7) 760 | - SocketRocket (0.6.0) 761 | - Yoga (1.14.0) 762 | - YogaKit (1.18.1): 763 | - Yoga (~> 1.14) 764 | 765 | DEPENDENCIES: 766 | - AppTurboModules (from `./../tm`) 767 | - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) 768 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) 769 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) 770 | - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) 771 | - Flipper (= 0.125.0) 772 | - Flipper-Boost-iOSX (= 1.76.0.1.11) 773 | - Flipper-DoubleConversion (= 3.2.0.1) 774 | - Flipper-Fmt (= 7.1.7) 775 | - Flipper-Folly (= 2.6.10) 776 | - Flipper-Glog (= 0.5.0.5) 777 | - Flipper-PeerTalk (= 0.0.4) 778 | - Flipper-RSocket (= 1.4.3) 779 | - FlipperKit (= 0.125.0) 780 | - FlipperKit/Core (= 0.125.0) 781 | - FlipperKit/CppBridge (= 0.125.0) 782 | - FlipperKit/FBCxxFollyDynamicConvert (= 0.125.0) 783 | - FlipperKit/FBDefines (= 0.125.0) 784 | - FlipperKit/FKPortForwarding (= 0.125.0) 785 | - FlipperKit/FlipperKitHighlightOverlay (= 0.125.0) 786 | - FlipperKit/FlipperKitLayoutPlugin (= 0.125.0) 787 | - FlipperKit/FlipperKitLayoutTextSearchable (= 0.125.0) 788 | - FlipperKit/FlipperKitNetworkPlugin (= 0.125.0) 789 | - FlipperKit/FlipperKitReactPlugin (= 0.125.0) 790 | - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0) 791 | - FlipperKit/SKIOSNetworkPlugin (= 0.125.0) 792 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) 793 | - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) 794 | - libevent (~> 2.1.12) 795 | - OpenSSL-Universal (= 1.1.1100) 796 | - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) 797 | - RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) 798 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) 799 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) 800 | - React (from `../node_modules/react-native/`) 801 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) 802 | - React-Codegen (from `build/generated/ios`) 803 | - React-Core (from `../node_modules/react-native/`) 804 | - React-Core/DevSupport (from `../node_modules/react-native/`) 805 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`) 806 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) 807 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) 808 | - React-Fabric (from `../node_modules/react-native/ReactCommon`) 809 | - React-graphics (from `../node_modules/react-native/ReactCommon/react/renderer/graphics`) 810 | - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) 811 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) 812 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) 813 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) 814 | - React-logger (from `../node_modules/react-native/ReactCommon/logger`) 815 | - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) 816 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) 817 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) 818 | - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`) 819 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) 820 | - React-RCTFabric (from `../node_modules/react-native/React`) 821 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) 822 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) 823 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) 824 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) 825 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`) 826 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) 827 | - React-rncore (from `../node_modules/react-native/ReactCommon`) 828 | - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) 829 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) 830 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) 831 | 832 | SPEC REPOS: 833 | trunk: 834 | - CocoaAsyncSocket 835 | - Flipper 836 | - Flipper-Boost-iOSX 837 | - Flipper-DoubleConversion 838 | - Flipper-Fmt 839 | - Flipper-Folly 840 | - Flipper-Glog 841 | - Flipper-PeerTalk 842 | - Flipper-RSocket 843 | - FlipperKit 844 | - fmt 845 | - libevent 846 | - OpenSSL-Universal 847 | - SocketRocket 848 | - YogaKit 849 | 850 | EXTERNAL SOURCES: 851 | AppTurboModules: 852 | :path: "./../tm" 853 | boost: 854 | :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" 855 | DoubleConversion: 856 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" 857 | FBLazyVector: 858 | :path: "../node_modules/react-native/Libraries/FBLazyVector" 859 | FBReactNativeSpec: 860 | :path: "../node_modules/react-native/React/FBReactNativeSpec" 861 | glog: 862 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" 863 | hermes-engine: 864 | :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" 865 | RCT-Folly: 866 | :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" 867 | RCTRequired: 868 | :path: "../node_modules/react-native/Libraries/RCTRequired" 869 | RCTTypeSafety: 870 | :path: "../node_modules/react-native/Libraries/TypeSafety" 871 | React: 872 | :path: "../node_modules/react-native/" 873 | React-callinvoker: 874 | :path: "../node_modules/react-native/ReactCommon/callinvoker" 875 | React-Codegen: 876 | :path: build/generated/ios 877 | React-Core: 878 | :path: "../node_modules/react-native/" 879 | React-CoreModules: 880 | :path: "../node_modules/react-native/React/CoreModules" 881 | React-cxxreact: 882 | :path: "../node_modules/react-native/ReactCommon/cxxreact" 883 | React-Fabric: 884 | :path: "../node_modules/react-native/ReactCommon" 885 | React-graphics: 886 | :path: "../node_modules/react-native/ReactCommon/react/renderer/graphics" 887 | React-hermes: 888 | :path: "../node_modules/react-native/ReactCommon/hermes" 889 | React-jsi: 890 | :path: "../node_modules/react-native/ReactCommon/jsi" 891 | React-jsiexecutor: 892 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor" 893 | React-jsinspector: 894 | :path: "../node_modules/react-native/ReactCommon/jsinspector" 895 | React-logger: 896 | :path: "../node_modules/react-native/ReactCommon/logger" 897 | React-perflogger: 898 | :path: "../node_modules/react-native/ReactCommon/reactperflogger" 899 | React-RCTActionSheet: 900 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS" 901 | React-RCTAnimation: 902 | :path: "../node_modules/react-native/Libraries/NativeAnimation" 903 | React-RCTAppDelegate: 904 | :path: "../node_modules/react-native/Libraries/AppDelegate" 905 | React-RCTBlob: 906 | :path: "../node_modules/react-native/Libraries/Blob" 907 | React-RCTFabric: 908 | :path: "../node_modules/react-native/React" 909 | React-RCTImage: 910 | :path: "../node_modules/react-native/Libraries/Image" 911 | React-RCTLinking: 912 | :path: "../node_modules/react-native/Libraries/LinkingIOS" 913 | React-RCTNetwork: 914 | :path: "../node_modules/react-native/Libraries/Network" 915 | React-RCTSettings: 916 | :path: "../node_modules/react-native/Libraries/Settings" 917 | React-RCTText: 918 | :path: "../node_modules/react-native/Libraries/Text" 919 | React-RCTVibration: 920 | :path: "../node_modules/react-native/Libraries/Vibration" 921 | React-rncore: 922 | :path: "../node_modules/react-native/ReactCommon" 923 | React-runtimeexecutor: 924 | :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" 925 | ReactCommon: 926 | :path: "../node_modules/react-native/ReactCommon" 927 | Yoga: 928 | :path: "../node_modules/react-native/ReactCommon/yoga" 929 | 930 | SPEC CHECKSUMS: 931 | AppTurboModules: ae62a6212b818035bdd71c60ca8cc82129a03946 932 | boost: 57d2868c099736d80fcd648bf211b4431e51a558 933 | CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 934 | DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 935 | FBLazyVector: a89a0525bc7ca174675045c2b492b5280d5a2470 936 | FBReactNativeSpec: 3978f6ab2d9917e8a7bf91411f03091a7ce1bef7 937 | Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0 938 | Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c 939 | Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 940 | Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b 941 | Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 942 | Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 943 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 944 | Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 945 | FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86 946 | fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 947 | glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b 948 | hermes-engine: 4438d2b8bf8bebaba1b1ac0451160bab59e491f8 949 | libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 950 | OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c 951 | RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 952 | RCTRequired: 5a4a30ac20c86eeadd6844a9328f78d4168cf9b2 953 | RCTTypeSafety: 279fc5861a89f0f37db3a585f27f971485b4b734 954 | React: 88307a9be3bd0e71a6822271cf28b84a587fb97f 955 | React-callinvoker: 35fb980c454104ebe82f0afb9826830089248e08 956 | React-Codegen: 9d5b0e26925f225c01acf45018f59cb06e1b10fb 957 | React-Core: 385cb6fa78762c6409ff39faeb0dd9ad664b6e84 958 | React-CoreModules: c2b7db313b04d9b71954ffd55d0c2e46bc40e9fb 959 | React-cxxreact: 845fefb889132e5d004ff818f7a599e32c52e7d6 960 | React-Fabric: 9c9bc6f7459594b24d7288d1388e91b1b109b22d 961 | React-graphics: a7e870a0b7394a1310f8ec90d17fa26652b294c4 962 | React-hermes: 86135f35e1dd2dfccfb97afe96d0c06f6a3970c4 963 | React-jsi: 39c116aa6c3d6f3d9874eff6998a670b47882a28 964 | React-jsiexecutor: eaa5f71eb8f6861cf0e57f1a0f52aeb020d9e18e 965 | React-jsinspector: 9885f6f94d231b95a739ef7bb50536fb87ce7539 966 | React-logger: 3f8ebad1be1bf3299d1ab6d7f971802d7395c7ef 967 | React-perflogger: 2d505bbe298e3b7bacdd9e542b15535be07220f6 968 | React-RCTActionSheet: 0e96e4560bd733c9b37efbf68f5b1a47615892fb 969 | React-RCTAnimation: fd138e26f120371c87e406745a27535e2c8a04ef 970 | React-RCTAppDelegate: fe3201d79f34c68dd1ef2b18a8bd4ab92d8853a3 971 | React-RCTBlob: 38a7185f06a0ce8153a023e63b406a28d67b955d 972 | React-RCTFabric: 0beb3c1828e88c853b262636d5739920e70c0c22 973 | React-RCTImage: 92b0966e7c1cadda889e961c474397ad5180e194 974 | React-RCTLinking: b80f8d0c6e94c54294b0048def51f57eaa9a27af 975 | React-RCTNetwork: 491b0c65ac22edbd6695d12d084b4943103b009b 976 | React-RCTSettings: 97af3e8abe0023349ec015910df3bda1a0380117 977 | React-RCTText: 33c85753bd714d527d2ae538dc56ec24c6783d84 978 | React-RCTVibration: 08f132cad9896458776f37c112e71d60aef1c6ae 979 | React-rncore: f60e5973fbf1682cc57380ea9b0fe81280e5033b 980 | React-runtimeexecutor: c5c89f8f543842dd864b63ded1b0bbb9c9445328 981 | ReactCommon: dbfbe2f7f3c5ce4ce44f43f2fd0d5950d1eb67c5 982 | SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 983 | Yoga: d56980c8914db0b51692f55533409e844b66133c 984 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a 985 | 986 | PODFILE CHECKSUM: 4a469de621d246a5ac706e101bfa1724b62fd4b8 987 | 988 | COCOAPODS: 1.12.1 989 | -------------------------------------------------------------------------------- /ios/RustInReactNativeDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00E356F31AD99517003FC87E /* RustInReactNativeDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* RustInReactNativeDemoTests.m */; }; 11 | 0C80B921A6F3F58F76C31292 /* libPods-RustInReactNativeDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-RustInReactNativeDemo.a */; }; 12 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 14 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 15 | 7699B88040F8A987B510C191 /* libPods-RustInReactNativeDemo-RustInReactNativeDemoTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-RustInReactNativeDemo-RustInReactNativeDemoTests.a */; }; 16 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 25 | remoteInfo = RustInReactNativeDemo; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 00E356EE1AD99517003FC87E /* RustInReactNativeDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RustInReactNativeDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 00E356F21AD99517003FC87E /* RustInReactNativeDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RustInReactNativeDemoTests.m; sourceTree = ""; }; 33 | 13B07F961A680F5B00A75B9A /* RustInReactNativeDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RustInReactNativeDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = RustInReactNativeDemo/AppDelegate.h; sourceTree = ""; }; 35 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = RustInReactNativeDemo/AppDelegate.mm; sourceTree = ""; }; 36 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = RustInReactNativeDemo/Images.xcassets; sourceTree = ""; }; 37 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RustInReactNativeDemo/Info.plist; sourceTree = ""; }; 38 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = RustInReactNativeDemo/main.m; sourceTree = ""; }; 39 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-RustInReactNativeDemo-RustInReactNativeDemoTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RustInReactNativeDemo-RustInReactNativeDemoTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 3B4392A12AC88292D35C810B /* Pods-RustInReactNativeDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RustInReactNativeDemo.debug.xcconfig"; path = "Target Support Files/Pods-RustInReactNativeDemo/Pods-RustInReactNativeDemo.debug.xcconfig"; sourceTree = ""; }; 41 | 5709B34CF0A7D63546082F79 /* Pods-RustInReactNativeDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RustInReactNativeDemo.release.xcconfig"; path = "Target Support Files/Pods-RustInReactNativeDemo/Pods-RustInReactNativeDemo.release.xcconfig"; sourceTree = ""; }; 42 | 5B7EB9410499542E8C5724F5 /* Pods-RustInReactNativeDemo-RustInReactNativeDemoTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RustInReactNativeDemo-RustInReactNativeDemoTests.debug.xcconfig"; path = "Target Support Files/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests.debug.xcconfig"; sourceTree = ""; }; 43 | 5DCACB8F33CDC322A6C60F78 /* libPods-RustInReactNativeDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RustInReactNativeDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = RustInReactNativeDemo/LaunchScreen.storyboard; sourceTree = ""; }; 45 | 89C6BE57DB24E9ADA2F236DE /* Pods-RustInReactNativeDemo-RustInReactNativeDemoTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RustInReactNativeDemo-RustInReactNativeDemoTests.release.xcconfig"; path = "Target Support Files/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests.release.xcconfig"; sourceTree = ""; }; 46 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 47 | /* End PBXFileReference section */ 48 | 49 | /* Begin PBXFrameworksBuildPhase section */ 50 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 51 | isa = PBXFrameworksBuildPhase; 52 | buildActionMask = 2147483647; 53 | files = ( 54 | 7699B88040F8A987B510C191 /* libPods-RustInReactNativeDemo-RustInReactNativeDemoTests.a in Frameworks */, 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 59 | isa = PBXFrameworksBuildPhase; 60 | buildActionMask = 2147483647; 61 | files = ( 62 | 0C80B921A6F3F58F76C31292 /* libPods-RustInReactNativeDemo.a in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 00E356EF1AD99517003FC87E /* RustInReactNativeDemoTests */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 00E356F21AD99517003FC87E /* RustInReactNativeDemoTests.m */, 73 | 00E356F01AD99517003FC87E /* Supporting Files */, 74 | ); 75 | path = RustInReactNativeDemoTests; 76 | sourceTree = ""; 77 | }; 78 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 00E356F11AD99517003FC87E /* Info.plist */, 82 | ); 83 | name = "Supporting Files"; 84 | sourceTree = ""; 85 | }; 86 | 13B07FAE1A68108700A75B9A /* RustInReactNativeDemo */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 90 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */, 91 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 92 | 13B07FB61A68108700A75B9A /* Info.plist */, 93 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, 94 | 13B07FB71A68108700A75B9A /* main.m */, 95 | ); 96 | name = RustInReactNativeDemo; 97 | sourceTree = ""; 98 | }; 99 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 103 | 5DCACB8F33CDC322A6C60F78 /* libPods-RustInReactNativeDemo.a */, 104 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-RustInReactNativeDemo-RustInReactNativeDemoTests.a */, 105 | ); 106 | name = Frameworks; 107 | sourceTree = ""; 108 | }; 109 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | ); 113 | name = Libraries; 114 | sourceTree = ""; 115 | }; 116 | 83CBB9F61A601CBA00E9B192 = { 117 | isa = PBXGroup; 118 | children = ( 119 | 13B07FAE1A68108700A75B9A /* RustInReactNativeDemo */, 120 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 121 | 00E356EF1AD99517003FC87E /* RustInReactNativeDemoTests */, 122 | 83CBBA001A601CBA00E9B192 /* Products */, 123 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 124 | BBD78D7AC51CEA395F1C20DB /* Pods */, 125 | ); 126 | indentWidth = 2; 127 | sourceTree = ""; 128 | tabWidth = 2; 129 | usesTabs = 0; 130 | }; 131 | 83CBBA001A601CBA00E9B192 /* Products */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 13B07F961A680F5B00A75B9A /* RustInReactNativeDemo.app */, 135 | 00E356EE1AD99517003FC87E /* RustInReactNativeDemoTests.xctest */, 136 | ); 137 | name = Products; 138 | sourceTree = ""; 139 | }; 140 | BBD78D7AC51CEA395F1C20DB /* Pods */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | 3B4392A12AC88292D35C810B /* Pods-RustInReactNativeDemo.debug.xcconfig */, 144 | 5709B34CF0A7D63546082F79 /* Pods-RustInReactNativeDemo.release.xcconfig */, 145 | 5B7EB9410499542E8C5724F5 /* Pods-RustInReactNativeDemo-RustInReactNativeDemoTests.debug.xcconfig */, 146 | 89C6BE57DB24E9ADA2F236DE /* Pods-RustInReactNativeDemo-RustInReactNativeDemoTests.release.xcconfig */, 147 | ); 148 | path = Pods; 149 | sourceTree = ""; 150 | }; 151 | /* End PBXGroup section */ 152 | 153 | /* Begin PBXNativeTarget section */ 154 | 00E356ED1AD99517003FC87E /* RustInReactNativeDemoTests */ = { 155 | isa = PBXNativeTarget; 156 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "RustInReactNativeDemoTests" */; 157 | buildPhases = ( 158 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, 159 | 00E356EA1AD99517003FC87E /* Sources */, 160 | 00E356EB1AD99517003FC87E /* Frameworks */, 161 | 00E356EC1AD99517003FC87E /* Resources */, 162 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, 163 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, 164 | ); 165 | buildRules = ( 166 | ); 167 | dependencies = ( 168 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 169 | ); 170 | name = RustInReactNativeDemoTests; 171 | productName = RustInReactNativeDemoTests; 172 | productReference = 00E356EE1AD99517003FC87E /* RustInReactNativeDemoTests.xctest */; 173 | productType = "com.apple.product-type.bundle.unit-test"; 174 | }; 175 | 13B07F861A680F5B00A75B9A /* RustInReactNativeDemo */ = { 176 | isa = PBXNativeTarget; 177 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RustInReactNativeDemo" */; 178 | buildPhases = ( 179 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, 180 | FD10A7F022414F080027D42C /* Start Packager */, 181 | 13B07F871A680F5B00A75B9A /* Sources */, 182 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 183 | 13B07F8E1A680F5B00A75B9A /* Resources */, 184 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 185 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, 186 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, 187 | ); 188 | buildRules = ( 189 | ); 190 | dependencies = ( 191 | ); 192 | name = RustInReactNativeDemo; 193 | productName = RustInReactNativeDemo; 194 | productReference = 13B07F961A680F5B00A75B9A /* RustInReactNativeDemo.app */; 195 | productType = "com.apple.product-type.application"; 196 | }; 197 | /* End PBXNativeTarget section */ 198 | 199 | /* Begin PBXProject section */ 200 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 201 | isa = PBXProject; 202 | attributes = { 203 | LastUpgradeCheck = 1210; 204 | TargetAttributes = { 205 | 00E356ED1AD99517003FC87E = { 206 | CreatedOnToolsVersion = 6.2; 207 | TestTargetID = 13B07F861A680F5B00A75B9A; 208 | }; 209 | 13B07F861A680F5B00A75B9A = { 210 | LastSwiftMigration = 1120; 211 | }; 212 | }; 213 | }; 214 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RustInReactNativeDemo" */; 215 | compatibilityVersion = "Xcode 12.0"; 216 | developmentRegion = en; 217 | hasScannedForEncodings = 0; 218 | knownRegions = ( 219 | en, 220 | Base, 221 | ); 222 | mainGroup = 83CBB9F61A601CBA00E9B192; 223 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 224 | projectDirPath = ""; 225 | projectRoot = ""; 226 | targets = ( 227 | 13B07F861A680F5B00A75B9A /* RustInReactNativeDemo */, 228 | 00E356ED1AD99517003FC87E /* RustInReactNativeDemoTests */, 229 | ); 230 | }; 231 | /* End PBXProject section */ 232 | 233 | /* Begin PBXResourcesBuildPhase section */ 234 | 00E356EC1AD99517003FC87E /* Resources */ = { 235 | isa = PBXResourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | }; 241 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 242 | isa = PBXResourcesBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 246 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 247 | ); 248 | runOnlyForDeploymentPostprocessing = 0; 249 | }; 250 | /* End PBXResourcesBuildPhase section */ 251 | 252 | /* Begin PBXShellScriptBuildPhase section */ 253 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 254 | isa = PBXShellScriptBuildPhase; 255 | buildActionMask = 2147483647; 256 | files = ( 257 | ); 258 | inputPaths = ( 259 | "$(SRCROOT)/.xcode.env.local", 260 | "$(SRCROOT)/.xcode.env", 261 | ); 262 | name = "Bundle React Native code and images"; 263 | outputPaths = ( 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | shellPath = /bin/sh; 267 | shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; 268 | }; 269 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { 270 | isa = PBXShellScriptBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | ); 274 | inputFileListPaths = ( 275 | "${PODS_ROOT}/Target Support Files/Pods-RustInReactNativeDemo/Pods-RustInReactNativeDemo-frameworks-${CONFIGURATION}-input-files.xcfilelist", 276 | ); 277 | name = "[CP] Embed Pods Frameworks"; 278 | outputFileListPaths = ( 279 | "${PODS_ROOT}/Target Support Files/Pods-RustInReactNativeDemo/Pods-RustInReactNativeDemo-frameworks-${CONFIGURATION}-output-files.xcfilelist", 280 | ); 281 | runOnlyForDeploymentPostprocessing = 0; 282 | shellPath = /bin/sh; 283 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RustInReactNativeDemo/Pods-RustInReactNativeDemo-frameworks.sh\"\n"; 284 | showEnvVarsInLog = 0; 285 | }; 286 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { 287 | isa = PBXShellScriptBuildPhase; 288 | buildActionMask = 2147483647; 289 | files = ( 290 | ); 291 | inputFileListPaths = ( 292 | ); 293 | inputPaths = ( 294 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 295 | "${PODS_ROOT}/Manifest.lock", 296 | ); 297 | name = "[CP] Check Pods Manifest.lock"; 298 | outputFileListPaths = ( 299 | ); 300 | outputPaths = ( 301 | "$(DERIVED_FILE_DIR)/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests-checkManifestLockResult.txt", 302 | ); 303 | runOnlyForDeploymentPostprocessing = 0; 304 | shellPath = /bin/sh; 305 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 306 | showEnvVarsInLog = 0; 307 | }; 308 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { 309 | isa = PBXShellScriptBuildPhase; 310 | buildActionMask = 2147483647; 311 | files = ( 312 | ); 313 | inputFileListPaths = ( 314 | ); 315 | inputPaths = ( 316 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 317 | "${PODS_ROOT}/Manifest.lock", 318 | ); 319 | name = "[CP] Check Pods Manifest.lock"; 320 | outputFileListPaths = ( 321 | ); 322 | outputPaths = ( 323 | "$(DERIVED_FILE_DIR)/Pods-RustInReactNativeDemo-checkManifestLockResult.txt", 324 | ); 325 | runOnlyForDeploymentPostprocessing = 0; 326 | shellPath = /bin/sh; 327 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 328 | showEnvVarsInLog = 0; 329 | }; 330 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { 331 | isa = PBXShellScriptBuildPhase; 332 | buildActionMask = 2147483647; 333 | files = ( 334 | ); 335 | inputFileListPaths = ( 336 | "${PODS_ROOT}/Target Support Files/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", 337 | ); 338 | name = "[CP] Embed Pods Frameworks"; 339 | outputFileListPaths = ( 340 | "${PODS_ROOT}/Target Support Files/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", 341 | ); 342 | runOnlyForDeploymentPostprocessing = 0; 343 | shellPath = /bin/sh; 344 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests-frameworks.sh\"\n"; 345 | showEnvVarsInLog = 0; 346 | }; 347 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { 348 | isa = PBXShellScriptBuildPhase; 349 | buildActionMask = 2147483647; 350 | files = ( 351 | ); 352 | inputFileListPaths = ( 353 | "${PODS_ROOT}/Target Support Files/Pods-RustInReactNativeDemo/Pods-RustInReactNativeDemo-resources-${CONFIGURATION}-input-files.xcfilelist", 354 | ); 355 | name = "[CP] Copy Pods Resources"; 356 | outputFileListPaths = ( 357 | "${PODS_ROOT}/Target Support Files/Pods-RustInReactNativeDemo/Pods-RustInReactNativeDemo-resources-${CONFIGURATION}-output-files.xcfilelist", 358 | ); 359 | runOnlyForDeploymentPostprocessing = 0; 360 | shellPath = /bin/sh; 361 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RustInReactNativeDemo/Pods-RustInReactNativeDemo-resources.sh\"\n"; 362 | showEnvVarsInLog = 0; 363 | }; 364 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { 365 | isa = PBXShellScriptBuildPhase; 366 | buildActionMask = 2147483647; 367 | files = ( 368 | ); 369 | inputFileListPaths = ( 370 | "${PODS_ROOT}/Target Support Files/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests-resources-${CONFIGURATION}-input-files.xcfilelist", 371 | ); 372 | name = "[CP] Copy Pods Resources"; 373 | outputFileListPaths = ( 374 | "${PODS_ROOT}/Target Support Files/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests-resources-${CONFIGURATION}-output-files.xcfilelist", 375 | ); 376 | runOnlyForDeploymentPostprocessing = 0; 377 | shellPath = /bin/sh; 378 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests/Pods-RustInReactNativeDemo-RustInReactNativeDemoTests-resources.sh\"\n"; 379 | showEnvVarsInLog = 0; 380 | }; 381 | FD10A7F022414F080027D42C /* Start Packager */ = { 382 | isa = PBXShellScriptBuildPhase; 383 | buildActionMask = 2147483647; 384 | files = ( 385 | ); 386 | inputFileListPaths = ( 387 | ); 388 | inputPaths = ( 389 | ); 390 | name = "Start Packager"; 391 | outputFileListPaths = ( 392 | ); 393 | outputPaths = ( 394 | ); 395 | runOnlyForDeploymentPostprocessing = 0; 396 | shellPath = /bin/sh; 397 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; 398 | showEnvVarsInLog = 0; 399 | }; 400 | /* End PBXShellScriptBuildPhase section */ 401 | 402 | /* Begin PBXSourcesBuildPhase section */ 403 | 00E356EA1AD99517003FC87E /* Sources */ = { 404 | isa = PBXSourcesBuildPhase; 405 | buildActionMask = 2147483647; 406 | files = ( 407 | 00E356F31AD99517003FC87E /* RustInReactNativeDemoTests.m in Sources */, 408 | ); 409 | runOnlyForDeploymentPostprocessing = 0; 410 | }; 411 | 13B07F871A680F5B00A75B9A /* Sources */ = { 412 | isa = PBXSourcesBuildPhase; 413 | buildActionMask = 2147483647; 414 | files = ( 415 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, 416 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 417 | ); 418 | runOnlyForDeploymentPostprocessing = 0; 419 | }; 420 | /* End PBXSourcesBuildPhase section */ 421 | 422 | /* Begin PBXTargetDependency section */ 423 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 424 | isa = PBXTargetDependency; 425 | target = 13B07F861A680F5B00A75B9A /* RustInReactNativeDemo */; 426 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 427 | }; 428 | /* End PBXTargetDependency section */ 429 | 430 | /* Begin XCBuildConfiguration section */ 431 | 00E356F61AD99517003FC87E /* Debug */ = { 432 | isa = XCBuildConfiguration; 433 | baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-RustInReactNativeDemo-RustInReactNativeDemoTests.debug.xcconfig */; 434 | buildSettings = { 435 | BUNDLE_LOADER = "$(TEST_HOST)"; 436 | GCC_PREPROCESSOR_DEFINITIONS = ( 437 | "DEBUG=1", 438 | "$(inherited)", 439 | ); 440 | INFOPLIST_FILE = RustInReactNativeDemoTests/Info.plist; 441 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 442 | LD_RUNPATH_SEARCH_PATHS = ( 443 | "$(inherited)", 444 | "@executable_path/Frameworks", 445 | "@loader_path/Frameworks", 446 | ); 447 | OTHER_LDFLAGS = ( 448 | "-ObjC", 449 | "-lc++", 450 | "$(inherited)", 451 | ); 452 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 453 | PRODUCT_NAME = "$(TARGET_NAME)"; 454 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RustInReactNativeDemo.app/RustInReactNativeDemo"; 455 | }; 456 | name = Debug; 457 | }; 458 | 00E356F71AD99517003FC87E /* Release */ = { 459 | isa = XCBuildConfiguration; 460 | baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-RustInReactNativeDemo-RustInReactNativeDemoTests.release.xcconfig */; 461 | buildSettings = { 462 | BUNDLE_LOADER = "$(TEST_HOST)"; 463 | COPY_PHASE_STRIP = NO; 464 | INFOPLIST_FILE = RustInReactNativeDemoTests/Info.plist; 465 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 466 | LD_RUNPATH_SEARCH_PATHS = ( 467 | "$(inherited)", 468 | "@executable_path/Frameworks", 469 | "@loader_path/Frameworks", 470 | ); 471 | OTHER_LDFLAGS = ( 472 | "-ObjC", 473 | "-lc++", 474 | "$(inherited)", 475 | ); 476 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 477 | PRODUCT_NAME = "$(TARGET_NAME)"; 478 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/RustInReactNativeDemo.app/RustInReactNativeDemo"; 479 | }; 480 | name = Release; 481 | }; 482 | 13B07F941A680F5B00A75B9A /* Debug */ = { 483 | isa = XCBuildConfiguration; 484 | baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-RustInReactNativeDemo.debug.xcconfig */; 485 | buildSettings = { 486 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 487 | CLANG_ENABLE_MODULES = YES; 488 | CURRENT_PROJECT_VERSION = 1; 489 | ENABLE_BITCODE = NO; 490 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64"; 491 | INFOPLIST_FILE = RustInReactNativeDemo/Info.plist; 492 | LD_RUNPATH_SEARCH_PATHS = ( 493 | "$(inherited)", 494 | "@executable_path/Frameworks", 495 | ); 496 | LIBRARY_SEARCH_PATHS = ( 497 | "$(SDKROOT)/usr/lib/swift", 498 | "$(inherited)", 499 | "$(PODS_ROOT)/../../rust/target/universal/release", 500 | ); 501 | MARKETING_VERSION = 1.0; 502 | OTHER_LDFLAGS = ( 503 | "$(inherited)", 504 | "-ObjC", 505 | "-lc++", 506 | ); 507 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 508 | PRODUCT_NAME = RustInReactNativeDemo; 509 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 510 | SWIFT_VERSION = 5.0; 511 | VERSIONING_SYSTEM = "apple-generic"; 512 | }; 513 | name = Debug; 514 | }; 515 | 13B07F951A680F5B00A75B9A /* Release */ = { 516 | isa = XCBuildConfiguration; 517 | baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-RustInReactNativeDemo.release.xcconfig */; 518 | buildSettings = { 519 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 520 | CLANG_ENABLE_MODULES = YES; 521 | CURRENT_PROJECT_VERSION = 1; 522 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64"; 523 | INFOPLIST_FILE = RustInReactNativeDemo/Info.plist; 524 | LD_RUNPATH_SEARCH_PATHS = ( 525 | "$(inherited)", 526 | "@executable_path/Frameworks", 527 | ); 528 | LIBRARY_SEARCH_PATHS = ( 529 | "$(SDKROOT)/usr/lib/swift", 530 | "$(inherited)", 531 | "$(PODS_ROOT)/../../rust/target/universal/release", 532 | ); 533 | MARKETING_VERSION = 1.0; 534 | OTHER_LDFLAGS = ( 535 | "$(inherited)", 536 | "-ObjC", 537 | "-lc++", 538 | ); 539 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 540 | PRODUCT_NAME = RustInReactNativeDemo; 541 | SWIFT_VERSION = 5.0; 542 | VERSIONING_SYSTEM = "apple-generic"; 543 | }; 544 | name = Release; 545 | }; 546 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 547 | isa = XCBuildConfiguration; 548 | buildSettings = { 549 | ALWAYS_SEARCH_USER_PATHS = NO; 550 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 551 | CLANG_CXX_LANGUAGE_STANDARD = "c++17"; 552 | CLANG_CXX_LIBRARY = "libc++"; 553 | CLANG_ENABLE_MODULES = YES; 554 | CLANG_ENABLE_OBJC_ARC = YES; 555 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 556 | CLANG_WARN_BOOL_CONVERSION = YES; 557 | CLANG_WARN_COMMA = YES; 558 | CLANG_WARN_CONSTANT_CONVERSION = YES; 559 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 560 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 561 | CLANG_WARN_EMPTY_BODY = YES; 562 | CLANG_WARN_ENUM_CONVERSION = YES; 563 | CLANG_WARN_INFINITE_RECURSION = YES; 564 | CLANG_WARN_INT_CONVERSION = YES; 565 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 566 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 567 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 568 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 569 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 570 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 571 | CLANG_WARN_STRICT_PROTOTYPES = YES; 572 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 573 | CLANG_WARN_UNREACHABLE_CODE = YES; 574 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 575 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 576 | COPY_PHASE_STRIP = NO; 577 | ENABLE_STRICT_OBJC_MSGSEND = YES; 578 | ENABLE_TESTABILITY = YES; 579 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; 580 | GCC_C_LANGUAGE_STANDARD = gnu99; 581 | GCC_DYNAMIC_NO_PIC = NO; 582 | GCC_NO_COMMON_BLOCKS = YES; 583 | GCC_OPTIMIZATION_LEVEL = 0; 584 | GCC_PREPROCESSOR_DEFINITIONS = ( 585 | "DEBUG=1", 586 | "$(inherited)", 587 | ); 588 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 589 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 590 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 591 | GCC_WARN_UNDECLARED_SELECTOR = YES; 592 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 593 | GCC_WARN_UNUSED_FUNCTION = YES; 594 | GCC_WARN_UNUSED_VARIABLE = YES; 595 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 596 | LD_RUNPATH_SEARCH_PATHS = ( 597 | /usr/lib/swift, 598 | "$(inherited)", 599 | ); 600 | LIBRARY_SEARCH_PATHS = ( 601 | "\"$(SDKROOT)/usr/lib/swift\"", 602 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 603 | "\"$(inherited)\"", 604 | ); 605 | MTL_ENABLE_DEBUG_INFO = YES; 606 | ONLY_ACTIVE_ARCH = YES; 607 | OTHER_CPLUSPLUSFLAGS = ( 608 | "$(OTHER_CFLAGS)", 609 | "-DFOLLY_NO_CONFIG", 610 | "-DFOLLY_MOBILE=1", 611 | "-DFOLLY_USE_LIBCPP=1", 612 | ); 613 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; 614 | SDKROOT = iphoneos; 615 | }; 616 | name = Debug; 617 | }; 618 | 83CBBA211A601CBA00E9B192 /* Release */ = { 619 | isa = XCBuildConfiguration; 620 | buildSettings = { 621 | ALWAYS_SEARCH_USER_PATHS = NO; 622 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 623 | CLANG_CXX_LANGUAGE_STANDARD = "c++17"; 624 | CLANG_CXX_LIBRARY = "libc++"; 625 | CLANG_ENABLE_MODULES = YES; 626 | CLANG_ENABLE_OBJC_ARC = YES; 627 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 628 | CLANG_WARN_BOOL_CONVERSION = YES; 629 | CLANG_WARN_COMMA = YES; 630 | CLANG_WARN_CONSTANT_CONVERSION = YES; 631 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 632 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 633 | CLANG_WARN_EMPTY_BODY = YES; 634 | CLANG_WARN_ENUM_CONVERSION = YES; 635 | CLANG_WARN_INFINITE_RECURSION = YES; 636 | CLANG_WARN_INT_CONVERSION = YES; 637 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 638 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 639 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 640 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 641 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 642 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 643 | CLANG_WARN_STRICT_PROTOTYPES = YES; 644 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 645 | CLANG_WARN_UNREACHABLE_CODE = YES; 646 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 647 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 648 | COPY_PHASE_STRIP = YES; 649 | ENABLE_NS_ASSERTIONS = NO; 650 | ENABLE_STRICT_OBJC_MSGSEND = YES; 651 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; 652 | GCC_C_LANGUAGE_STANDARD = gnu99; 653 | GCC_NO_COMMON_BLOCKS = YES; 654 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 655 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 656 | GCC_WARN_UNDECLARED_SELECTOR = YES; 657 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 658 | GCC_WARN_UNUSED_FUNCTION = YES; 659 | GCC_WARN_UNUSED_VARIABLE = YES; 660 | IPHONEOS_DEPLOYMENT_TARGET = 12.4; 661 | LD_RUNPATH_SEARCH_PATHS = ( 662 | /usr/lib/swift, 663 | "$(inherited)", 664 | ); 665 | LIBRARY_SEARCH_PATHS = ( 666 | "\"$(SDKROOT)/usr/lib/swift\"", 667 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 668 | "\"$(inherited)\"", 669 | ); 670 | MTL_ENABLE_DEBUG_INFO = NO; 671 | OTHER_CPLUSPLUSFLAGS = ( 672 | "$(OTHER_CFLAGS)", 673 | "-DFOLLY_NO_CONFIG", 674 | "-DFOLLY_MOBILE=1", 675 | "-DFOLLY_USE_LIBCPP=1", 676 | ); 677 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; 678 | SDKROOT = iphoneos; 679 | VALIDATE_PRODUCT = YES; 680 | }; 681 | name = Release; 682 | }; 683 | /* End XCBuildConfiguration section */ 684 | 685 | /* Begin XCConfigurationList section */ 686 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "RustInReactNativeDemoTests" */ = { 687 | isa = XCConfigurationList; 688 | buildConfigurations = ( 689 | 00E356F61AD99517003FC87E /* Debug */, 690 | 00E356F71AD99517003FC87E /* Release */, 691 | ); 692 | defaultConfigurationIsVisible = 0; 693 | defaultConfigurationName = Release; 694 | }; 695 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RustInReactNativeDemo" */ = { 696 | isa = XCConfigurationList; 697 | buildConfigurations = ( 698 | 13B07F941A680F5B00A75B9A /* Debug */, 699 | 13B07F951A680F5B00A75B9A /* Release */, 700 | ); 701 | defaultConfigurationIsVisible = 0; 702 | defaultConfigurationName = Release; 703 | }; 704 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RustInReactNativeDemo" */ = { 705 | isa = XCConfigurationList; 706 | buildConfigurations = ( 707 | 83CBBA201A601CBA00E9B192 /* Debug */, 708 | 83CBBA211A601CBA00E9B192 /* Release */, 709 | ); 710 | defaultConfigurationIsVisible = 0; 711 | defaultConfigurationName = Release; 712 | }; 713 | /* End XCConfigurationList section */ 714 | }; 715 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 716 | } 717 | -------------------------------------------------------------------------------- /ios/RustInReactNativeDemo.xcodeproj/xcshareddata/xcschemes/RustInReactNativeDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ios/RustInReactNativeDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/RustInReactNativeDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/RustInReactNativeDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : RCTAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/RustInReactNativeDemo/AppDelegate.mm: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | 5 | #import 6 | #import 7 | #import 8 | 9 | @interface AppDelegate () {} 10 | @end 11 | 12 | @implementation AppDelegate 13 | 14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 15 | { 16 | self.moduleName = @"RustInReactNativeDemo"; 17 | // You can add your custom initial props in the dictionary below. 18 | // They will be passed down to the ViewController used by React Native. 19 | self.initialProps = @{}; 20 | 21 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 22 | } 23 | 24 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 25 | { 26 | #if DEBUG 27 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; 28 | #else 29 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 30 | #endif 31 | } 32 | 33 | /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. 34 | /// 35 | /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html 36 | /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). 37 | /// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`. 38 | - (BOOL)concurrentRootEnabled 39 | { 40 | return true; 41 | } 42 | 43 | 44 | #pragma mark RCTTurboModuleManagerDelegate 45 | 46 | - (std::shared_ptr)getTurboModule:(const std::string &)name 47 | jsInvoker:(std::shared_ptr)jsInvoker 48 | { 49 | if (name == "NativeTurboModule") { 50 | return std::make_shared(jsInvoker); 51 | } 52 | return nullptr; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /ios/RustInReactNativeDemo/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ios-marketing", 45 | "scale" : "1x", 46 | "size" : "1024x1024" 47 | } 48 | ], 49 | "info" : { 50 | "author" : "xcode", 51 | "version" : 1 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /ios/RustInReactNativeDemo/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/RustInReactNativeDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | RustInReactNativeDemo 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(CURRENT_PROJECT_VERSION) 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSExceptionDomains 30 | 31 | localhost 32 | 33 | NSExceptionAllowsInsecureHTTPLoads 34 | 35 | 36 | 37 | 38 | NSLocationWhenInUseUsageDescription 39 | 40 | UILaunchStoryboardName 41 | LaunchScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | UIViewControllerBasedStatusBarAppearance 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /ios/RustInReactNativeDemo/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ios/RustInReactNativeDemo/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | @autoreleasepool { 8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ios/RustInReactNativeDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/RustInReactNativeDemoTests/RustInReactNativeDemoTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import 5 | #import 6 | 7 | #define TIMEOUT_SECONDS 600 8 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 9 | 10 | @interface RustInReactNativeDemoTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation RustInReactNativeDemoTests 15 | 16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test 17 | { 18 | if (test(view)) { 19 | return YES; 20 | } 21 | for (UIView *subview in [view subviews]) { 22 | if ([self findSubviewInView:subview matching:test]) { 23 | return YES; 24 | } 25 | } 26 | return NO; 27 | } 28 | 29 | - (void)testRendersWelcomeScreen 30 | { 31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 33 | BOOL foundElement = NO; 34 | 35 | __block NSString *redboxError = nil; 36 | #ifdef DEBUG 37 | RCTSetLogFunction( 38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 39 | if (level >= RCTLogLevelError) { 40 | redboxError = message; 41 | } 42 | }); 43 | #endif 44 | 45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 48 | 49 | foundElement = [self findSubviewInView:vc.view 50 | matching:^BOOL(UIView *view) { 51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 52 | return YES; 53 | } 54 | return NO; 55 | }]; 56 | } 57 | 58 | #ifdef DEBUG 59 | RCTSetLogFunction(RCTDefaultLogFunction); 60 | #endif 61 | 62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: true, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RustInReactNativeDemo", 3 | "description": "Demo of how to use Rust in React Native", 4 | "author": "Ashoat Tevosyan (https://github.com/ashoat)", 5 | "license": "BSD-3-Clause", 6 | "homepage": "https://github.com/Ashoat/rust-in-react-native-demo/#readme", 7 | "repository": "https://github.com/Ashoat/rust-in-react-native-demo", 8 | "version": "0.0.1", 9 | "private": true, 10 | "scripts": { 11 | "android": "react-native run-android", 12 | "ios": "react-native run-ios", 13 | "lint": "eslint .", 14 | "start": "react-native start", 15 | "test": "jest" 16 | }, 17 | "dependencies": { 18 | "react": "18.2.0", 19 | "react-native": "0.71.7" 20 | }, 21 | "devDependencies": { 22 | "@babel/core": "^7.20.0", 23 | "@babel/preset-env": "^7.20.0", 24 | "@babel/runtime": "^7.20.0", 25 | "@react-native-community/eslint-config": "^3.2.0", 26 | "@tsconfig/react-native": "^2.0.2", 27 | "@types/jest": "^29.2.1", 28 | "@types/react": "^18.0.24", 29 | "@types/react-test-renderer": "^18.0.0", 30 | "babel-jest": "^29.2.1", 31 | "eslint": "^8.19.0", 32 | "jest": "^29.2.1", 33 | "metro-react-native-babel-preset": "0.73.9", 34 | "prettier": "^2.4.1", 35 | "react-test-renderer": "18.2.0", 36 | "typescript": "4.8.4" 37 | }, 38 | "jest": { 39 | "preset": "react-native" 40 | }, 41 | "codegenConfig": { 42 | "name": "AppSpecs", 43 | "type": "all", 44 | "jsSrcsDir": "tm", 45 | "android": { 46 | "javaPackageName": "com.facebook.fbreact.specs" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /rust/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | -------------------------------------------------------------------------------- /rust/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aho-corasick" 7 | version = "1.0.1" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" 10 | dependencies = [ 11 | "memchr", 12 | ] 13 | 14 | [[package]] 15 | name = "anyhow" 16 | version = "1.0.71" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" 19 | 20 | [[package]] 21 | name = "autocfg" 22 | version = "1.1.0" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 25 | 26 | [[package]] 27 | name = "bitflags" 28 | version = "1.3.2" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 31 | 32 | [[package]] 33 | name = "bytes" 34 | version = "1.4.0" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" 37 | 38 | [[package]] 39 | name = "cc" 40 | version = "1.0.79" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 43 | 44 | [[package]] 45 | name = "cfg-if" 46 | version = "1.0.0" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 49 | 50 | [[package]] 51 | name = "codespan-reporting" 52 | version = "0.11.1" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" 55 | dependencies = [ 56 | "termcolor", 57 | "unicode-width", 58 | ] 59 | 60 | [[package]] 61 | name = "convert_case" 62 | version = "0.4.0" 63 | source = "registry+https://github.com/rust-lang/crates.io-index" 64 | checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" 65 | 66 | [[package]] 67 | name = "cxx" 68 | version = "1.0.94" 69 | source = "registry+https://github.com/rust-lang/crates.io-index" 70 | checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" 71 | dependencies = [ 72 | "cc", 73 | "cxxbridge-flags", 74 | "cxxbridge-macro", 75 | "link-cplusplus", 76 | ] 77 | 78 | [[package]] 79 | name = "cxx-build" 80 | version = "1.0.94" 81 | source = "registry+https://github.com/rust-lang/crates.io-index" 82 | checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" 83 | dependencies = [ 84 | "cc", 85 | "codespan-reporting", 86 | "once_cell", 87 | "proc-macro2", 88 | "quote", 89 | "scratch", 90 | "syn 2.0.15", 91 | ] 92 | 93 | [[package]] 94 | name = "cxxbridge-flags" 95 | version = "1.0.94" 96 | source = "registry+https://github.com/rust-lang/crates.io-index" 97 | checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" 98 | 99 | [[package]] 100 | name = "cxxbridge-macro" 101 | version = "1.0.94" 102 | source = "registry+https://github.com/rust-lang/crates.io-index" 103 | checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" 104 | dependencies = [ 105 | "proc-macro2", 106 | "quote", 107 | "syn 2.0.15", 108 | ] 109 | 110 | [[package]] 111 | name = "derive_more" 112 | version = "0.99.17" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" 115 | dependencies = [ 116 | "convert_case", 117 | "proc-macro2", 118 | "quote", 119 | "rustc_version", 120 | "syn 1.0.109", 121 | ] 122 | 123 | [[package]] 124 | name = "either" 125 | version = "1.8.1" 126 | source = "registry+https://github.com/rust-lang/crates.io-index" 127 | checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" 128 | 129 | [[package]] 130 | name = "errno" 131 | version = "0.3.1" 132 | source = "registry+https://github.com/rust-lang/crates.io-index" 133 | checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" 134 | dependencies = [ 135 | "errno-dragonfly", 136 | "libc", 137 | "windows-sys 0.48.0", 138 | ] 139 | 140 | [[package]] 141 | name = "errno-dragonfly" 142 | version = "0.1.2" 143 | source = "registry+https://github.com/rust-lang/crates.io-index" 144 | checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" 145 | dependencies = [ 146 | "cc", 147 | "libc", 148 | ] 149 | 150 | [[package]] 151 | name = "fastrand" 152 | version = "1.9.0" 153 | source = "registry+https://github.com/rust-lang/crates.io-index" 154 | checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" 155 | dependencies = [ 156 | "instant", 157 | ] 158 | 159 | [[package]] 160 | name = "fixedbitset" 161 | version = "0.4.2" 162 | source = "registry+https://github.com/rust-lang/crates.io-index" 163 | checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" 164 | 165 | [[package]] 166 | name = "futures-core" 167 | version = "0.3.28" 168 | source = "registry+https://github.com/rust-lang/crates.io-index" 169 | checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" 170 | 171 | [[package]] 172 | name = "getrandom" 173 | version = "0.2.9" 174 | source = "registry+https://github.com/rust-lang/crates.io-index" 175 | checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" 176 | dependencies = [ 177 | "cfg-if", 178 | "libc", 179 | "wasi", 180 | ] 181 | 182 | [[package]] 183 | name = "hashbrown" 184 | version = "0.12.3" 185 | source = "registry+https://github.com/rust-lang/crates.io-index" 186 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 187 | 188 | [[package]] 189 | name = "heck" 190 | version = "0.4.1" 191 | source = "registry+https://github.com/rust-lang/crates.io-index" 192 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 193 | 194 | [[package]] 195 | name = "hermit-abi" 196 | version = "0.2.6" 197 | source = "registry+https://github.com/rust-lang/crates.io-index" 198 | checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" 199 | dependencies = [ 200 | "libc", 201 | ] 202 | 203 | [[package]] 204 | name = "hermit-abi" 205 | version = "0.3.1" 206 | source = "registry+https://github.com/rust-lang/crates.io-index" 207 | checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" 208 | 209 | [[package]] 210 | name = "indexmap" 211 | version = "1.9.3" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 214 | dependencies = [ 215 | "autocfg", 216 | "hashbrown", 217 | ] 218 | 219 | [[package]] 220 | name = "instant" 221 | version = "0.1.12" 222 | source = "registry+https://github.com/rust-lang/crates.io-index" 223 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 224 | dependencies = [ 225 | "cfg-if", 226 | ] 227 | 228 | [[package]] 229 | name = "io-lifetimes" 230 | version = "1.0.10" 231 | source = "registry+https://github.com/rust-lang/crates.io-index" 232 | checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" 233 | dependencies = [ 234 | "hermit-abi 0.3.1", 235 | "libc", 236 | "windows-sys 0.48.0", 237 | ] 238 | 239 | [[package]] 240 | name = "itertools" 241 | version = "0.10.5" 242 | source = "registry+https://github.com/rust-lang/crates.io-index" 243 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 244 | dependencies = [ 245 | "either", 246 | ] 247 | 248 | [[package]] 249 | name = "itoa" 250 | version = "1.0.6" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" 253 | 254 | [[package]] 255 | name = "lazy_static" 256 | version = "1.4.0" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 259 | 260 | [[package]] 261 | name = "libc" 262 | version = "0.2.144" 263 | source = "registry+https://github.com/rust-lang/crates.io-index" 264 | checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" 265 | 266 | [[package]] 267 | name = "link-cplusplus" 268 | version = "1.0.8" 269 | source = "registry+https://github.com/rust-lang/crates.io-index" 270 | checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" 271 | dependencies = [ 272 | "cc", 273 | ] 274 | 275 | [[package]] 276 | name = "linux-raw-sys" 277 | version = "0.3.7" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f" 280 | 281 | [[package]] 282 | name = "log" 283 | version = "0.4.17" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 286 | dependencies = [ 287 | "cfg-if", 288 | ] 289 | 290 | [[package]] 291 | name = "memchr" 292 | version = "2.5.0" 293 | source = "registry+https://github.com/rust-lang/crates.io-index" 294 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 295 | 296 | [[package]] 297 | name = "multimap" 298 | version = "0.8.3" 299 | source = "registry+https://github.com/rust-lang/crates.io-index" 300 | checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" 301 | 302 | [[package]] 303 | name = "num_cpus" 304 | version = "1.15.0" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" 307 | dependencies = [ 308 | "hermit-abi 0.2.6", 309 | "libc", 310 | ] 311 | 312 | [[package]] 313 | name = "once_cell" 314 | version = "1.17.1" 315 | source = "registry+https://github.com/rust-lang/crates.io-index" 316 | checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" 317 | 318 | [[package]] 319 | name = "petgraph" 320 | version = "0.6.3" 321 | source = "registry+https://github.com/rust-lang/crates.io-index" 322 | checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" 323 | dependencies = [ 324 | "fixedbitset", 325 | "indexmap", 326 | ] 327 | 328 | [[package]] 329 | name = "pin-project-lite" 330 | version = "0.2.9" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 333 | 334 | [[package]] 335 | name = "ppv-lite86" 336 | version = "0.2.17" 337 | source = "registry+https://github.com/rust-lang/crates.io-index" 338 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 339 | 340 | [[package]] 341 | name = "prettyplease" 342 | version = "0.1.25" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" 345 | dependencies = [ 346 | "proc-macro2", 347 | "syn 1.0.109", 348 | ] 349 | 350 | [[package]] 351 | name = "proc-macro2" 352 | version = "1.0.56" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" 355 | dependencies = [ 356 | "unicode-ident", 357 | ] 358 | 359 | [[package]] 360 | name = "prost" 361 | version = "0.11.9" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" 364 | dependencies = [ 365 | "bytes", 366 | "prost-derive", 367 | ] 368 | 369 | [[package]] 370 | name = "prost-build" 371 | version = "0.11.9" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" 374 | dependencies = [ 375 | "bytes", 376 | "heck", 377 | "itertools", 378 | "lazy_static", 379 | "log", 380 | "multimap", 381 | "petgraph", 382 | "prettyplease", 383 | "prost", 384 | "prost-types", 385 | "regex", 386 | "syn 1.0.109", 387 | "tempfile", 388 | "which", 389 | ] 390 | 391 | [[package]] 392 | name = "prost-derive" 393 | version = "0.11.9" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" 396 | dependencies = [ 397 | "anyhow", 398 | "itertools", 399 | "proc-macro2", 400 | "quote", 401 | "syn 1.0.109", 402 | ] 403 | 404 | [[package]] 405 | name = "prost-types" 406 | version = "0.11.9" 407 | source = "registry+https://github.com/rust-lang/crates.io-index" 408 | checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" 409 | dependencies = [ 410 | "prost", 411 | ] 412 | 413 | [[package]] 414 | name = "quote" 415 | version = "1.0.27" 416 | source = "registry+https://github.com/rust-lang/crates.io-index" 417 | checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" 418 | dependencies = [ 419 | "proc-macro2", 420 | ] 421 | 422 | [[package]] 423 | name = "rand" 424 | version = "0.8.5" 425 | source = "registry+https://github.com/rust-lang/crates.io-index" 426 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 427 | dependencies = [ 428 | "libc", 429 | "rand_chacha", 430 | "rand_core", 431 | ] 432 | 433 | [[package]] 434 | name = "rand_chacha" 435 | version = "0.3.1" 436 | source = "registry+https://github.com/rust-lang/crates.io-index" 437 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 438 | dependencies = [ 439 | "ppv-lite86", 440 | "rand_core", 441 | ] 442 | 443 | [[package]] 444 | name = "rand_core" 445 | version = "0.6.4" 446 | source = "registry+https://github.com/rust-lang/crates.io-index" 447 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 448 | dependencies = [ 449 | "getrandom", 450 | ] 451 | 452 | [[package]] 453 | name = "redox_syscall" 454 | version = "0.3.5" 455 | source = "registry+https://github.com/rust-lang/crates.io-index" 456 | checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" 457 | dependencies = [ 458 | "bitflags", 459 | ] 460 | 461 | [[package]] 462 | name = "regex" 463 | version = "1.8.1" 464 | source = "registry+https://github.com/rust-lang/crates.io-index" 465 | checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" 466 | dependencies = [ 467 | "aho-corasick", 468 | "memchr", 469 | "regex-syntax", 470 | ] 471 | 472 | [[package]] 473 | name = "regex-syntax" 474 | version = "0.7.1" 475 | source = "registry+https://github.com/rust-lang/crates.io-index" 476 | checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" 477 | 478 | [[package]] 479 | name = "rust" 480 | version = "0.1.0" 481 | dependencies = [ 482 | "cxx", 483 | "cxx-build", 484 | "derive_more", 485 | "lazy_static", 486 | "rand", 487 | "regex", 488 | "serde", 489 | "serde_json", 490 | "tokio", 491 | "tokio-stream", 492 | "tonic-build", 493 | ] 494 | 495 | [[package]] 496 | name = "rustc_version" 497 | version = "0.4.0" 498 | source = "registry+https://github.com/rust-lang/crates.io-index" 499 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 500 | dependencies = [ 501 | "semver", 502 | ] 503 | 504 | [[package]] 505 | name = "rustix" 506 | version = "0.37.19" 507 | source = "registry+https://github.com/rust-lang/crates.io-index" 508 | checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" 509 | dependencies = [ 510 | "bitflags", 511 | "errno", 512 | "io-lifetimes", 513 | "libc", 514 | "linux-raw-sys", 515 | "windows-sys 0.48.0", 516 | ] 517 | 518 | [[package]] 519 | name = "ryu" 520 | version = "1.0.13" 521 | source = "registry+https://github.com/rust-lang/crates.io-index" 522 | checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" 523 | 524 | [[package]] 525 | name = "scratch" 526 | version = "1.0.5" 527 | source = "registry+https://github.com/rust-lang/crates.io-index" 528 | checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" 529 | 530 | [[package]] 531 | name = "semver" 532 | version = "1.0.17" 533 | source = "registry+https://github.com/rust-lang/crates.io-index" 534 | checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" 535 | 536 | [[package]] 537 | name = "serde" 538 | version = "1.0.163" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" 541 | dependencies = [ 542 | "serde_derive", 543 | ] 544 | 545 | [[package]] 546 | name = "serde_derive" 547 | version = "1.0.163" 548 | source = "registry+https://github.com/rust-lang/crates.io-index" 549 | checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" 550 | dependencies = [ 551 | "proc-macro2", 552 | "quote", 553 | "syn 2.0.15", 554 | ] 555 | 556 | [[package]] 557 | name = "serde_json" 558 | version = "1.0.96" 559 | source = "registry+https://github.com/rust-lang/crates.io-index" 560 | checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" 561 | dependencies = [ 562 | "itoa", 563 | "ryu", 564 | "serde", 565 | ] 566 | 567 | [[package]] 568 | name = "syn" 569 | version = "1.0.109" 570 | source = "registry+https://github.com/rust-lang/crates.io-index" 571 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 572 | dependencies = [ 573 | "proc-macro2", 574 | "quote", 575 | "unicode-ident", 576 | ] 577 | 578 | [[package]] 579 | name = "syn" 580 | version = "2.0.15" 581 | source = "registry+https://github.com/rust-lang/crates.io-index" 582 | checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" 583 | dependencies = [ 584 | "proc-macro2", 585 | "quote", 586 | "unicode-ident", 587 | ] 588 | 589 | [[package]] 590 | name = "tempfile" 591 | version = "3.5.0" 592 | source = "registry+https://github.com/rust-lang/crates.io-index" 593 | checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" 594 | dependencies = [ 595 | "cfg-if", 596 | "fastrand", 597 | "redox_syscall", 598 | "rustix", 599 | "windows-sys 0.45.0", 600 | ] 601 | 602 | [[package]] 603 | name = "termcolor" 604 | version = "1.2.0" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" 607 | dependencies = [ 608 | "winapi-util", 609 | ] 610 | 611 | [[package]] 612 | name = "tokio" 613 | version = "1.28.1" 614 | source = "registry+https://github.com/rust-lang/crates.io-index" 615 | checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" 616 | dependencies = [ 617 | "autocfg", 618 | "num_cpus", 619 | "pin-project-lite", 620 | "tokio-macros", 621 | "windows-sys 0.48.0", 622 | ] 623 | 624 | [[package]] 625 | name = "tokio-macros" 626 | version = "2.1.0" 627 | source = "registry+https://github.com/rust-lang/crates.io-index" 628 | checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" 629 | dependencies = [ 630 | "proc-macro2", 631 | "quote", 632 | "syn 2.0.15", 633 | ] 634 | 635 | [[package]] 636 | name = "tokio-stream" 637 | version = "0.1.14" 638 | source = "registry+https://github.com/rust-lang/crates.io-index" 639 | checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" 640 | dependencies = [ 641 | "futures-core", 642 | "pin-project-lite", 643 | "tokio", 644 | ] 645 | 646 | [[package]] 647 | name = "tonic-build" 648 | version = "0.9.2" 649 | source = "registry+https://github.com/rust-lang/crates.io-index" 650 | checksum = "a6fdaae4c2c638bb70fe42803a26fbd6fc6ac8c72f5c59f67ecc2a2dcabf4b07" 651 | dependencies = [ 652 | "prettyplease", 653 | "proc-macro2", 654 | "prost-build", 655 | "quote", 656 | "syn 1.0.109", 657 | ] 658 | 659 | [[package]] 660 | name = "unicode-ident" 661 | version = "1.0.8" 662 | source = "registry+https://github.com/rust-lang/crates.io-index" 663 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 664 | 665 | [[package]] 666 | name = "unicode-width" 667 | version = "0.1.10" 668 | source = "registry+https://github.com/rust-lang/crates.io-index" 669 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 670 | 671 | [[package]] 672 | name = "wasi" 673 | version = "0.11.0+wasi-snapshot-preview1" 674 | source = "registry+https://github.com/rust-lang/crates.io-index" 675 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 676 | 677 | [[package]] 678 | name = "which" 679 | version = "4.4.0" 680 | source = "registry+https://github.com/rust-lang/crates.io-index" 681 | checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" 682 | dependencies = [ 683 | "either", 684 | "libc", 685 | "once_cell", 686 | ] 687 | 688 | [[package]] 689 | name = "winapi" 690 | version = "0.3.9" 691 | source = "registry+https://github.com/rust-lang/crates.io-index" 692 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 693 | dependencies = [ 694 | "winapi-i686-pc-windows-gnu", 695 | "winapi-x86_64-pc-windows-gnu", 696 | ] 697 | 698 | [[package]] 699 | name = "winapi-i686-pc-windows-gnu" 700 | version = "0.4.0" 701 | source = "registry+https://github.com/rust-lang/crates.io-index" 702 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 703 | 704 | [[package]] 705 | name = "winapi-util" 706 | version = "0.1.5" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 709 | dependencies = [ 710 | "winapi", 711 | ] 712 | 713 | [[package]] 714 | name = "winapi-x86_64-pc-windows-gnu" 715 | version = "0.4.0" 716 | source = "registry+https://github.com/rust-lang/crates.io-index" 717 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 718 | 719 | [[package]] 720 | name = "windows-sys" 721 | version = "0.45.0" 722 | source = "registry+https://github.com/rust-lang/crates.io-index" 723 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 724 | dependencies = [ 725 | "windows-targets 0.42.2", 726 | ] 727 | 728 | [[package]] 729 | name = "windows-sys" 730 | version = "0.48.0" 731 | source = "registry+https://github.com/rust-lang/crates.io-index" 732 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 733 | dependencies = [ 734 | "windows-targets 0.48.0", 735 | ] 736 | 737 | [[package]] 738 | name = "windows-targets" 739 | version = "0.42.2" 740 | source = "registry+https://github.com/rust-lang/crates.io-index" 741 | checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 742 | dependencies = [ 743 | "windows_aarch64_gnullvm 0.42.2", 744 | "windows_aarch64_msvc 0.42.2", 745 | "windows_i686_gnu 0.42.2", 746 | "windows_i686_msvc 0.42.2", 747 | "windows_x86_64_gnu 0.42.2", 748 | "windows_x86_64_gnullvm 0.42.2", 749 | "windows_x86_64_msvc 0.42.2", 750 | ] 751 | 752 | [[package]] 753 | name = "windows-targets" 754 | version = "0.48.0" 755 | source = "registry+https://github.com/rust-lang/crates.io-index" 756 | checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" 757 | dependencies = [ 758 | "windows_aarch64_gnullvm 0.48.0", 759 | "windows_aarch64_msvc 0.48.0", 760 | "windows_i686_gnu 0.48.0", 761 | "windows_i686_msvc 0.48.0", 762 | "windows_x86_64_gnu 0.48.0", 763 | "windows_x86_64_gnullvm 0.48.0", 764 | "windows_x86_64_msvc 0.48.0", 765 | ] 766 | 767 | [[package]] 768 | name = "windows_aarch64_gnullvm" 769 | version = "0.42.2" 770 | source = "registry+https://github.com/rust-lang/crates.io-index" 771 | checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 772 | 773 | [[package]] 774 | name = "windows_aarch64_gnullvm" 775 | version = "0.48.0" 776 | source = "registry+https://github.com/rust-lang/crates.io-index" 777 | checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" 778 | 779 | [[package]] 780 | name = "windows_aarch64_msvc" 781 | version = "0.42.2" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 784 | 785 | [[package]] 786 | name = "windows_aarch64_msvc" 787 | version = "0.48.0" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" 790 | 791 | [[package]] 792 | name = "windows_i686_gnu" 793 | version = "0.42.2" 794 | source = "registry+https://github.com/rust-lang/crates.io-index" 795 | checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 796 | 797 | [[package]] 798 | name = "windows_i686_gnu" 799 | version = "0.48.0" 800 | source = "registry+https://github.com/rust-lang/crates.io-index" 801 | checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" 802 | 803 | [[package]] 804 | name = "windows_i686_msvc" 805 | version = "0.42.2" 806 | source = "registry+https://github.com/rust-lang/crates.io-index" 807 | checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 808 | 809 | [[package]] 810 | name = "windows_i686_msvc" 811 | version = "0.48.0" 812 | source = "registry+https://github.com/rust-lang/crates.io-index" 813 | checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" 814 | 815 | [[package]] 816 | name = "windows_x86_64_gnu" 817 | version = "0.42.2" 818 | source = "registry+https://github.com/rust-lang/crates.io-index" 819 | checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 820 | 821 | [[package]] 822 | name = "windows_x86_64_gnu" 823 | version = "0.48.0" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" 826 | 827 | [[package]] 828 | name = "windows_x86_64_gnullvm" 829 | version = "0.42.2" 830 | source = "registry+https://github.com/rust-lang/crates.io-index" 831 | checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 832 | 833 | [[package]] 834 | name = "windows_x86_64_gnullvm" 835 | version = "0.48.0" 836 | source = "registry+https://github.com/rust-lang/crates.io-index" 837 | checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" 838 | 839 | [[package]] 840 | name = "windows_x86_64_msvc" 841 | version = "0.42.2" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 844 | 845 | [[package]] 846 | name = "windows_x86_64_msvc" 847 | version = "0.48.0" 848 | source = "registry+https://github.com/rust-lang/crates.io-index" 849 | checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" 850 | -------------------------------------------------------------------------------- /rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | license = "BSD-3-Clause" 6 | 7 | [dependencies] 8 | cxx = "1.0" 9 | tokio = { version = "1.24", features = ["macros", "rt-multi-thread"] } 10 | tokio-stream = "0.1" 11 | lazy_static = "1.4" 12 | rand = "0.8" 13 | regex = "1.6" 14 | derive_more = "0.99" 15 | serde = { version = "1.0", features = ["derive"] } 16 | serde_json = "1.0" 17 | 18 | [build-dependencies] 19 | cxx-build = "1.0" 20 | tonic-build = "0.9.1" 21 | 22 | [lib] 23 | crate-type = ["staticlib"] 24 | -------------------------------------------------------------------------------- /rust/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | cxx_build::bridge("src/lib.rs").flag_if_supported("-std=c++17"); 3 | } 4 | -------------------------------------------------------------------------------- /rust/src/lib.rs: -------------------------------------------------------------------------------- 1 | use ffi::string_callback; 2 | use lazy_static::lazy_static; 3 | use std::sync::Arc; 4 | use tokio::runtime::{Builder, Runtime}; 5 | 6 | lazy_static! { 7 | pub static ref RUNTIME: Arc = Arc::new( 8 | Builder::new_multi_thread() 9 | .worker_threads(1) 10 | .max_blocking_threads(1) 11 | .enable_all() 12 | .build() 13 | .unwrap() 14 | ); 15 | } 16 | 17 | #[cxx::bridge] 18 | mod ffi { 19 | extern "Rust" { 20 | #[cxx_name = "rustAdd"] 21 | fn add(a: u32, b: u32, promise_id: u32); 22 | } 23 | unsafe extern "C++" { 24 | include!("RustCallback.h"); 25 | #[cxx_name = "stringCallback"] 26 | fn string_callback(error: String, promise_id: u32, ret: String); 27 | } 28 | } 29 | 30 | fn add(a: u32, b: u32, promise_id: u32) { 31 | RUNTIME.spawn(async move { 32 | let result = add_helper(a, b).await; 33 | string_callback("".to_string(), promise_id, result); 34 | }); 35 | } 36 | 37 | async fn add_helper(a: u32, b: u32) -> String { 38 | (a + b).to_string() 39 | } 40 | -------------------------------------------------------------------------------- /tm/AppTurboModules.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "../package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "AppTurboModules" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.description = package["description"] 10 | s.homepage = package["homepage"] 11 | s.license = package["license"] 12 | s.platforms = { :ios => "12.4" } 13 | s.author = package["author"] 14 | s.source = { :git => package["repository"], :tag => "#{s.version}" } 15 | s.source_files = "**/*.{h,cpp}", "dist/cxx.h", "dist/lib.rs.cc", "dist/lib.rs.h" 16 | s.public_header_files = "**/*.h" 17 | s.vendored_libraries = '../rust/target/universal/release/librust.a' 18 | s.libraries = ['rust'] 19 | s.pod_target_xcconfig = { 20 | "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" 21 | } 22 | s.script_phases = [ 23 | { 24 | :name => 'Build Rust library', 25 | :script => '${PODS_TARGET_SRCROOT}/build-rust-native-library.sh', 26 | :execution_position => :before_compile 27 | } 28 | ] 29 | install_modules_dependencies(s) 30 | end 31 | -------------------------------------------------------------------------------- /tm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.13) 2 | set(CMAKE_VERBOSE_MAKEFILE on) 3 | 4 | add_compile_options( 5 | -fexceptions 6 | -frtti 7 | -std=c++17) 8 | 9 | file(GLOB tm_SRC CONFIGURE_DEPENDS *.cpp) 10 | add_library(tm STATIC ${tm_SRC}) 11 | 12 | target_include_directories(tm PUBLIC .) 13 | target_include_directories(react_codegen_AppSpecs PUBLIC .) 14 | 15 | target_link_libraries(tm 16 | jsi 17 | react_nativemodule_core 18 | react_codegen_AppSpecs) 19 | -------------------------------------------------------------------------------- /tm/NativeTurboModule.cpp: -------------------------------------------------------------------------------- 1 | #include "NativeTurboModule.h" 2 | 3 | #include 4 | #include "RustPromiseManager.h" 5 | #include "dist/lib.rs.h" 6 | 7 | namespace facebook::react { 8 | 9 | NativeTurboModule::NativeTurboModule(std::shared_ptr jsInvoker) 10 | : NativeTurboModuleCxxSpec(std::move(jsInvoker)) {} 11 | 12 | jsi::Value NativeTurboModule::add(jsi::Runtime& rt, double a, double b) { 13 | return createPromiseAsJSIValue( 14 | rt, 15 | [=](jsi::Runtime &innerRt, std::shared_ptr promise) { 16 | promise->resolve(a + b); 17 | std::string error; 18 | try { 19 | auto currentID = RustPromiseManager::instance.addPromise( 20 | promise, 21 | this->jsInvoker_, 22 | innerRt 23 | ); 24 | rustAdd( 25 | a, 26 | b, 27 | currentID 28 | ); 29 | } catch (const std::exception &e) { 30 | error = e.what(); 31 | } 32 | } 33 | ); 34 | } 35 | 36 | } // namespace facebook::react 37 | -------------------------------------------------------------------------------- /tm/NativeTurboModule.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if __has_include() // CocoaPod headers on Apple 4 | #include 5 | #elif __has_include("AppSpecsJSI.h") // CMake headers on Android 6 | #include "AppSpecsJSI.h" 7 | #endif 8 | #include 9 | 10 | namespace facebook::react { 11 | 12 | class NativeTurboModule : public NativeTurboModuleCxxSpec { 13 | public: 14 | NativeTurboModule(std::shared_ptr jsInvoker); 15 | 16 | jsi::Value add(jsi::Runtime &rt, double a, double b); 17 | }; 18 | 19 | } // namespace facebook::react 20 | -------------------------------------------------------------------------------- /tm/NativeTurboModule.ts: -------------------------------------------------------------------------------- 1 | import type {TurboModule} from 'react-native/Libraries/TurboModule/RCTExport'; 2 | import {TurboModuleRegistry} from 'react-native'; 3 | 4 | export interface Spec extends TurboModule { 5 | readonly add: (a: number, b: number) => Promise; 6 | } 7 | 8 | export default TurboModuleRegistry.getEnforcing( 9 | 'NativeTurboModule', 10 | ); 11 | -------------------------------------------------------------------------------- /tm/RustCallback.cpp: -------------------------------------------------------------------------------- 1 | #include "RustCallback.h" 2 | #include 3 | #include 4 | #include "RustPromiseManager.h" 5 | 6 | void stringCallback(rust::String error, uint32_t promiseID, rust::String ret) { 7 | auto it = RustPromiseManager::instance.promises.find(promiseID); 8 | if (it == RustPromiseManager::instance.promises.end()) { 9 | return; 10 | } 11 | 12 | if (error.size()) { 13 | RustPromiseManager::instance.rejectPromise(promiseID, std::string(error)); 14 | } else { 15 | folly::dynamic retDyn; 16 | retDyn = std::string(ret); 17 | RustPromiseManager::instance.resolvePromise(promiseID, retDyn); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tm/RustCallback.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "cxx.h" 4 | 5 | void stringCallback(rust::String error, uint32_t promiseID, rust::String ret); 6 | -------------------------------------------------------------------------------- /tm/RustPromiseManager.cpp: -------------------------------------------------------------------------------- 1 | #include "RustPromiseManager.h" 2 | 3 | RustPromiseManager RustPromiseManager::instance; 4 | 5 | RustPromiseManager::RustPromiseManager(){}; 6 | 7 | uint32_t RustPromiseManager::addPromise( 8 | std::shared_ptr promise, 9 | std::shared_ptr jsInvoker, 10 | facebook::jsi::Runtime &rt) { 11 | uint32_t id = getNextID(); 12 | PromiseInfo info = {promise, jsInvoker, rt}; 13 | // Acquire a lock for writing 14 | std::unique_lock lock(mutex); 15 | promises.insert({id, info}); 16 | return id; 17 | } 18 | 19 | void RustPromiseManager::removePromise(uint32_t id) { 20 | // Acquire a lock for writing 21 | std::unique_lock lock(mutex); 22 | promises.erase(id); 23 | } 24 | 25 | void RustPromiseManager::resolvePromise(uint32_t id, folly::dynamic ret) { 26 | // Acquire a shared lock for reading 27 | std::shared_lock lock(mutex); 28 | auto it = promises.find(id); 29 | if (it == promises.end()) { 30 | return; 31 | } 32 | // Release the shared lock 33 | lock.unlock(); 34 | auto promiseInfo = it->second; 35 | if (promiseInfo.jsInvoker) { 36 | promiseInfo.jsInvoker->invokeAsync( 37 | [promiseInfo, ret]() { 38 | promiseInfo.promise->resolve(valueFromDynamic(promiseInfo.rt, ret)); 39 | } 40 | ); 41 | } else { 42 | promiseInfo.promise->resolve(valueFromDynamic(promiseInfo.rt, ret)); 43 | } 44 | removePromise(id); 45 | } 46 | 47 | void RustPromiseManager::rejectPromise(uint32_t id, const std::string &error) { 48 | // Acquire a shared lock for reading 49 | std::shared_lock lock(mutex); 50 | auto it = promises.find(id); 51 | if (it == promises.end()) { 52 | return; 53 | } 54 | // Release the shared lock 55 | lock.unlock(); 56 | if (it->second.jsInvoker) { 57 | it->second.jsInvoker->invokeAsync( 58 | [promise = it->second.promise, error]() { 59 | promise->reject(error); 60 | } 61 | ); 62 | } else { 63 | it->second.promise->reject(error); 64 | } 65 | removePromise(id); 66 | } 67 | -------------------------------------------------------------------------------- /tm/RustPromiseManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | class RustPromiseManager { 11 | std::atomic id{0}; 12 | 13 | RustPromiseManager(); 14 | 15 | uint32_t getNextID() { 16 | return this->id++; 17 | }; 18 | 19 | public: 20 | static RustPromiseManager instance; 21 | uint32_t addPromise( 22 | std::shared_ptr promise, 23 | std::shared_ptr jsInvoker, 24 | facebook::jsi::Runtime &rt); 25 | void removePromise(uint32_t id); 26 | void resolvePromise(uint32_t id, folly::dynamic ret); 27 | void rejectPromise(uint32_t id, const std::string &error); 28 | 29 | struct PromiseInfo { 30 | std::shared_ptr promise; 31 | std::shared_ptr jsInvoker; 32 | facebook::jsi::Runtime &rt; 33 | }; 34 | std::unordered_map promises; 35 | std::shared_mutex mutex; 36 | }; 37 | -------------------------------------------------------------------------------- /tm/build-rust-native-library.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euxo pipefail 4 | 5 | PRJ_ROOT="$(git rev-parse --show-toplevel)" 6 | 7 | # The $PATH used by Xcode likely won't contain Cargo, fix that. 8 | # In addition, the $PATH used by XCode has lots of Apple-specific 9 | # developer tools that your Cargo isn't expecting to use, fix that. 10 | # Note: This assumes a default `rustup` setup and default path. 11 | build_path="$HOME/.cargo/bin:/usr/local/bin:/usr/bin:/bin${PATH:+:}$PATH" 12 | 13 | # cd to Cargo project 14 | cd "${SRCROOT}/../../rust" || exit 15 | 16 | # Set C++ standard and build cxx bridge 17 | export CXXFLAGS="-std=c++14" 18 | env PATH="${build_path}" cargo build --release 19 | 20 | # Build universal static library (works on simulator and iOS) 21 | env PATH="${build_path}" cargo lipo --release 22 | 23 | # Unset the flag specifying C++ standard 24 | unset CXXFLAGS 25 | 26 | # Copy the CXX files to the cargo project root to make them 27 | # available to XCode 28 | mkdir -p ../tm/dist 29 | cp "$(readlink target/cxxbridge/rust/src/lib.rs.cc)" ../tm/dist/ 30 | cp "$(readlink target/cxxbridge/rust/src/lib.rs.h)" ../tm/dist/ 31 | cp "$(readlink target/cxxbridge/rust/cxx.h)" ../tm/dist/ 32 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/react-native/tsconfig.json" 3 | } 4 | --------------------------------------------------------------------------------