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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'ReactNativeWasmBridgeApp'
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 |
--------------------------------------------------------------------------------
/rust_lib/lib.rs:
--------------------------------------------------------------------------------
1 | extern "C" {
2 | fn console_log(ptr: *const u8, len: usize);
3 | }
4 |
5 | #[no_mangle]
6 | pub fn add(a: i32, b: i32) -> i32 {
7 | a + b
8 | }
9 |
10 | #[no_mangle]
11 | pub fn initialize() {
12 | unsafe {
13 | console_log(b"Rust Wasm module initialized.\0".as_ptr(), 27);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/rust_lib/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | description = "rust2wasm2react-native bridge among Rust, WebAssembly and React-Native"
3 | edition = "2021"
4 | license = "MIT"
5 | name = "rust2wasm2react-native"
6 | repository = "https://github.com/xonoxitron/rust2wasm2react-native"
7 | version = "0.1.0"
8 |
9 | [lib]
10 | crate-type = ["cdylib"]
11 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/ios/ReactNativeWasmBridgeApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/ios/ReactNativeWasmBridgeApp.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/__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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/ios/ReactNativeWasmBridgeApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | */
7 |
8 | const metroDefault = require('metro-config/src/defaults/defaults');
9 |
10 | module.exports = {
11 | resolver: {
12 | assetExts: metroDefault.assetExts.concat(['wasm']),
13 | },
14 | transformer: {
15 | getTransformOptions: async () => ({
16 | transform: {
17 | experimentalImportSupport: false,
18 | inlineRequires: true,
19 | },
20 | }),
21 | },
22 | };
23 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/android/app/src/release/java/com/reactnativewasmbridgeapp/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.reactnativewasmbridgeapp;
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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/ios/ReactNativeWasmBridgeAppTests/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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
12 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) [2023] [Matteo Pisani]
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/ios/ReactNativeWasmBridgeApp/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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/.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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ReactNativeWasmBridgeApp",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "lint": "eslint .",
9 | "start": "react-native start",
10 | "test": "jest"
11 | },
12 | "dependencies": {
13 | "axios": "^1.4.0",
14 | "base-64": "^1.0.0",
15 | "react": "18.2.0",
16 | "react-native": "0.71.10",
17 | "react-native-fs": "^2.20.0",
18 | "react-native-webassembly": "^0.3.3"
19 | },
20 | "devDependencies": {
21 | "@babel/core": "^7.20.0",
22 | "@babel/preset-env": "^7.20.0",
23 | "@babel/runtime": "^7.20.0",
24 | "@react-native-community/eslint-config": "^3.2.0",
25 | "@tsconfig/react-native": "^2.0.2",
26 | "@types/base-64": "^1.0.0",
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 | }
42 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/ios/ReactNativeWasmBridgeApp/AppDelegate.mm:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 |
3 | #import
4 |
5 | @implementation AppDelegate
6 |
7 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
8 | {
9 | self.moduleName = @"ReactNativeWasmBridgeApp";
10 | // You can add your custom initial props in the dictionary below.
11 | // They will be passed down to the ViewController used by React Native.
12 | self.initialProps = @{};
13 |
14 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
15 | }
16 |
17 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
18 | {
19 | #if DEBUG
20 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
21 | #else
22 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
23 | #endif
24 | }
25 |
26 | /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
27 | ///
28 | /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
29 | /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
30 | /// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`.
31 | - (BOOL)concurrentRootEnabled
32 | {
33 | return true;
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/android/app/src/main/java/com/reactnativewasmbridgeapp/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.reactnativewasmbridgeapp;
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 "ReactNativeWasmBridgeApp";
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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/ios/ReactNativeWasmBridgeApp/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ReactNativeWasmBridgeApp
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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/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=false
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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/android/app/src/main/res/drawable/rn_edit_text_material.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
21 |
22 |
23 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/android/app/src/main/java/com/reactnativewasmbridgeapp/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.reactnativewasmbridgeapp;
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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/ios/ReactNativeWasmBridgeAppTests/ReactNativeWasmBridgeAppTests.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 ReactNativeWasmBridgeAppTests : XCTestCase
11 |
12 | @end
13 |
14 | @implementation ReactNativeWasmBridgeAppTests
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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/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 'ReactNativeWasmBridgeApp' 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 | target 'ReactNativeWasmBridgeAppTests' do
47 | inherit! :complete
48 | # Pods for testing
49 | end
50 |
51 | post_install do |installer|
52 | react_native_post_install(
53 | installer,
54 | # Set `mac_catalyst_enabled` to `true` in order to apply patches
55 | # necessary for Mac Catalyst builds
56 | :mac_catalyst_enabled => false
57 | )
58 | __apply_Xcode_12_5_M1_post_install_workaround(installer)
59 | end
60 | end
61 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | CFPropertyList (3.0.6)
5 | rexml
6 | activesupport (7.0.5)
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.14.1)
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.1.4
99 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/android/app/src/debug/java/com/reactnativewasmbridgeapp/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.reactnativewasmbridgeapp;
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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/ios/ReactNativeWasmBridgeApp.xcodeproj/xcshareddata/xcschemes/ReactNativeWasmBridgeApp.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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/ios/ReactNativeWasmBridgeApp/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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/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 | } from 'react-native';
19 |
20 | import {
21 | Colors,
22 | DebugInstructions,
23 | Header,
24 | LearnMoreLinks,
25 | ReloadInstructions,
26 | } from 'react-native/Libraries/NewAppScreen';
27 |
28 | import axios from 'axios';
29 | import RNFS from 'react-native-fs';
30 | import {decode as atob} from 'base-64';
31 |
32 | import * as WebAssembly from 'react-native-webassembly';
33 |
34 | type SectionProps = PropsWithChildren<{
35 | title: string;
36 | }>;
37 |
38 | function Section({children, title}: SectionProps): JSX.Element {
39 | const isDarkMode = useColorScheme() === 'dark';
40 | return (
41 |
42 |
49 | {title}
50 |
51 |
58 | {children}
59 |
60 |
61 | );
62 | }
63 |
64 | function App(): JSX.Element {
65 | const isDarkMode = useColorScheme() === 'dark';
66 |
67 | const backgroundStyle = {
68 | backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
69 | };
70 |
71 | const base64ToArrayBuffer = (base64: string) => {
72 | const binaryString = atob(base64);
73 | const length = binaryString.length;
74 | const arrayBuffer = new ArrayBuffer(length);
75 | const uintArray = new Uint8Array(arrayBuffer);
76 |
77 | for (let i = 0; i < length; i++) {
78 | uintArray[i] = binaryString.charCodeAt(i);
79 | }
80 |
81 | return arrayBuffer;
82 | };
83 |
84 | const loadWasmRemotely = async () => {
85 | const {data: bufferSource} = await axios({
86 | url: 'https://github.com/xonoxitron/rust2wasm2react-native/blob/main/wasm/rust_lib.wasm',
87 | method: 'get',
88 | responseType: 'arraybuffer',
89 | });
90 |
91 | const module = await WebAssembly.instantiate<{
92 | add: (a: number, b: number) => number;
93 | }>(bufferSource);
94 |
95 | console.log(module.instance.exports.add(1, 2));
96 | };
97 |
98 | loadWasmRemotely();
99 |
100 | const loadWasmLocally = async () => {
101 | try {
102 | const filePath = RNFS.MainBundlePath + '/rust_lib.wasm';
103 |
104 | const fileExists = await RNFS.exists(filePath);
105 | if (!fileExists) {
106 | console.log('File does not exist');
107 | return;
108 | }
109 |
110 | const content = await RNFS.readFile(filePath, 'base64');
111 | const bufferSource = base64ToArrayBuffer(content);
112 |
113 | const module = await WebAssembly.instantiate<{
114 | add: (a: number, b: number) => number;
115 | }>(bufferSource);
116 |
117 | console.log(module.instance.exports.add(3, 4));
118 | } catch (error) {
119 | console.log('Error:', error);
120 | }
121 | };
122 |
123 | loadWasmLocally();
124 |
125 | return (
126 |
127 |
131 |
134 |
135 |
139 |
140 | Edit App.tsx to change this
141 | screen and then come back to see your edits.
142 |
143 |
146 |
149 |
150 | Read the docs to discover what to do next:
151 |
152 |
153 |
154 |
155 |
156 | );
157 | }
158 |
159 | const styles = StyleSheet.create({
160 | sectionContainer: {
161 | marginTop: 32,
162 | paddingHorizontal: 24,
163 | },
164 | sectionTitle: {
165 | fontSize: 24,
166 | fontWeight: '600',
167 | },
168 | sectionDescription: {
169 | marginTop: 8,
170 | fontSize: 18,
171 | fontWeight: '400',
172 | },
173 | highlight: {
174 | fontWeight: '700',
175 | },
176 | });
177 |
178 | export default App;
179 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/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.reactnativewasmbridgeapp"
97 | defaultConfig {
98 | applicationId "com.reactnativewasmbridgeapp"
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 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # rust2wasm2react-native
2 |
3 | This project aims to bridge Rust, WebAssembly (WASM) and React Native together. It allows you to compile Rust code into WASM and then integrate it into a React Native application.
4 |
5 | ## Prerequisites
6 |
7 | Before getting started, make sure you have the following installed:
8 |
9 | - Node.js (>=18.0.0)
10 | - Yarn
11 | - Rust (>=1.50.0) with `wasm32-unknown-unknown` target installed
12 | - React Native CLI
13 |
14 | ## Installation
15 |
16 | 1. Clone the project repository:
17 |
18 | ```bash
19 | git clone https://github.com/your-username/rust2wasm2react-native.git
20 | ```
21 |
22 | 2. Navigate to the project directory:
23 |
24 | ```bash
25 | cd rust2wasm2react-native
26 | ```
27 |
28 | 3. Install project dependencies using Yarn:
29 |
30 | ```bash
31 | yarn install
32 | ```
33 |
34 | 4. Build the Rust code and copy the generated WASM file:
35 |
36 | ```bash
37 | sh build.sh
38 | ```
39 |
40 | ### Or alternatively, if you want to bootstrap your own one
41 |
42 | 1. Create a new React Native project using the following command:
43 |
44 | ```shell
45 | npx react-native init
46 | ```
47 |
48 | 2. Navigate to the project directory:
49 |
50 | ```shell
51 | cd
52 | ```
53 |
54 | 3. Install the required dependencies using Yarn:
55 |
56 | ```shell
57 | yarn add axios react-native-fs react-native-webassembly base-64 @types/base-64
58 | ```
59 |
60 | ## Rust library configuration
61 |
62 | 1. If you want to go full manual, inside the project directory, you can add new directory
63 |
64 | 2. Create a new file `lib.rs` inside the and add your Rust code to it.
65 |
66 | 3. Add a `Cargo.toml` file like the following:
67 |
68 | ```shell
69 | [package]
70 | description = "rust2wasm2react-native bridge among Rust, WebAssembly and React-Native"
71 | edition = "2021"
72 | license = "MIT"
73 | name = "rust2wasm2react-native"
74 | repository = ""
75 | version = "0.1.0"
76 |
77 | [lib]
78 | crate-type = ["cdylib"]
79 |
80 | ```
81 |
82 | ## Build the Rust **Code**
83 |
84 | 1. You can use the embedded `build.sh` located the project root directory
85 |
86 | 2. Make the `build.sh` script executable by running the following command:
87 |
88 | ```shell
89 | chmod +x build.sh
90 | ```
91 |
92 | 3. Build the Rust code and copy the Wasm file to the React Native project by executing the `build.sh` script:
93 |
94 | ```shell
95 | ./build.sh
96 |
97 | This script cleans the `wasm` directory, compiles the Rust code to Wasm using the `rustc` command, and copies the resulting Wasm file to the React Native project's `assets` directory.
98 |
99 | ## Metro Resolver Configuration
100 |
101 | To ensure that Metro, the JavaScript bundler used by React Native, recognizes the Wasm file as an asset, you need to extend the `metro.config.js` file. Follow these steps:
102 |
103 | 1. Open the `metro.config.js` file in the root directory of your project.
104 |
105 | 2. Locate the `getDefaultConfig` import at the top of the file:
106 |
107 | ```javascript
108 | const { getDefaultConfig } = require('metro-config');
109 | ```
110 |
111 | 3. Add the following code inside the `module.exports` function:
112 |
113 | ```javascript
114 | resolver: {
115 | assetExts: [...assetExts, 'wasm'], // Extend assetExts with 'wasm'
116 | },
117 | ```
118 |
119 | The `assetExts` property contains an array of file extensions that Metro considers as assets. By adding `'wasm'` to this array, Metro will recognize Wasm files as assets.
120 |
121 | ## Adding static WASM files to your project
122 |
123 | ### For iOS
124 |
125 | To include a static file in your React Native project and read it from the script in iOS, you can follow these steps:
126 |
127 | 1. Create a new directory called `assets` in the root of your React Native project. This directory will hold your static files.
128 |
129 | 2. Place the file you want to read in the `assets` directory. For example, let's say you have a file named `YourFile.wasm`.
130 |
131 | 3. In Xcode, open your project workspace by navigating to the `ios` directory of your React Native project and double-clicking the `.xcworkspace` file.
132 |
133 | 4. In Xcode, right-click on your project's root folder in the project navigator, and select "Add Files to [Your Project Name]".
134 |
135 | 5. Navigate to the `assets` directory in your React Native project and select the `YourFile.wasm` file. Make sure to check the "Copy items if needed" option and select the target you want to add the file to.
136 |
137 | 6. In your React Native script, you can use the `react-native-fs` library to read the file from the assets directory. Update your script to the following:
138 |
139 | ```tsx
140 | const App = () => {
141 | const loadFile = async () => {
142 | try {
143 | const filePath = RNFS.MainBundlePath + '/YourFile.wasm';
144 |
145 | const fileExists = await RNFS.exists(filePath);
146 | if (!fileExists) {
147 | console.log('File does not exist');
148 | return;
149 | }
150 | ...
151 | ```
152 |
153 | ### For Android
154 |
155 | To include a static file in your React Native project and read it from the script, you can follow these steps:
156 |
157 | 1. Create a new directory called `assets` in the root of your React Native project. This directory will hold your static files.
158 |
159 | 2. Place the file you want to read in the `assets` directory. For example, let's say you have a file named `YourFile.wasm`.
160 |
161 | 3. In your `android/app` directory, create a new directory called `src/main/assets`. This is where the files in your React Native `assets` directory will be bundled when building the Android app.
162 |
163 | 4. Copy or move the `assets` directory from the root of your project into `android/app/src/main`. You should now have `android/app/src/main/assets`.
164 |
165 | 5. In your `android/app/build.gradle` file, add the following lines inside the `android` block:
166 |
167 | ```gradle
168 | android {
169 | // ...
170 |
171 | // Add this block
172 | sourceSets {
173 | main {
174 | assets.srcDirs += 'src/main/assets'
175 | }
176 | }
177 | }
178 | ```
179 |
180 | 6. In your React Native script, you can use the `react-native-fs` library to read the file from the assets directory. Update your script to the following:
181 |
182 | ```tsx
183 | const App = () => {
184 | const loadFile = async () => {
185 | try {
186 | const filePath = 'file:///android_asset/YourFile.wasm';
187 |
188 | const fileExists = await RNFS.existsAssets(filePath);
189 | if (!fileExists) {
190 | console.log('File does not exist');
191 | return;
192 | }
193 | ...
194 | ```
195 |
196 | In this example, the `YourFile.wasm` file is placed in the `assets` directory. We then read the file using the `RNFS.readFileAssets` method, passing the file path as `file:///android_asset/YourFile.wasm`. The `RNFS.existsAssets` method is used to check if the file exists.
197 |
198 | By following these steps, you can include a static file in your React Native project and read it from the script.
199 |
200 | ## App Usage
201 |
202 | The main entry point of your React Native application is the `App.tsx` file. In this file, you can use the `react-native-webassembly` and `react-native-fs` libraries to load and interact with the Wasm module.
203 |
204 | 1. Open the `App.tsx` file located in the `ReactNativeWasmBridgeApp` directory.
205 |
206 | 2. Import the required modules and libraries at the top of the file:
207 |
208 | ```tsx
209 | import axios from 'axios';
210 | import RNFS from 'react-native-fs';
211 | import { decode as atob } from 'base-64';
212 |
213 | import * as WebAssembly from 'react-native-webassembly';
214 | ```
215 |
216 | 3. Update the `App` component to include the following code:
217 |
218 | ```tsx
219 | const App: React.FC = () => {
220 | const isDarkMode = useColorScheme() === 'dark';
221 |
222 | useEffect(() => {
223 | // Utility function to convert base64 string to ArrayBuffer
224 | const base64ToArrayBuffer = (base64: string) => {
225 | const binaryString = atob(base64);
226 | const length = binaryString.length;
227 | const arrayBuffer = new ArrayBuffer(length);
228 | const uintArray = new Uint8Array(arrayBuffer);
229 |
230 | for (let i = 0; i < length; i++) {
231 | uintArray[i] = binaryString.charCodeAt(i);
232 | }
233 |
234 | return arrayBuffer;
235 | };
236 |
237 | // Load the WebAssembly module remotely from a URL
238 | const loadWasmRemotely = async () => {
239 | const { data: bufferSource } = await axios({
240 | url:
241 | 'https://github.com/xonoxitron/rust2wasm2react-native/blob/main/wasm/rust_lib.wasm',
242 | method: 'get',
243 | responseType: 'arraybuffer',
244 | });
245 |
246 | const module = await WebAssembly.instantiate<{
247 | add: (a: number, b: number) => number;
248 | }>(bufferSource);
249 |
250 | console.log(module.instance.exports.add(1, 2));
251 | };
252 |
253 | loadWasmRemotely();
254 |
255 | // Load the WebAssembly module locally from the bundled file
256 | const loadWasmLocally = async () => {
257 | try {
258 | const filePath = `${RNFS.MainBundlePath}/rust_lib.wasm`;
259 |
260 | const fileExists = await RNFS.exists(filePath);
261 | if (!fileExists) {
262 | console.log('File does not exist');
263 | return;
264 | }
265 |
266 | const content = await RNFS.readFile(filePath, 'base64');
267 | const bufferSource = base64ToArrayBuffer(content);
268 |
269 | const module = await WebAssembly.instantiate<{
270 | add: (a: number, b: number) => number;
271 | }>(bufferSource);
272 |
273 | console.log(module.instance.exports.add(3, 4));
274 | } catch (error) {
275 | console.log('Error:', error);
276 | }
277 | };
278 |
279 | loadWasmLocally();
280 | }, []);
281 | ```
282 |
283 | 1. Customize the UI sections inside the `return` statement according to your application's requirements. You can add, remove, or modify the sections as needed.
284 |
285 | 2. Save the file.
286 |
287 | ## Usage
288 |
289 | To run the React Native application and test the integration with the Rust Wasm module, follow these steps:
290 |
291 | 1. Make sure you have a device or emulator connected to your development machine.
292 |
293 | 2. In the project directory, run the following command to start the Metro bundler:
294 |
295 | ```bash
296 | npx react-native start
297 | ```
298 |
299 | 3. Open a new terminal window and run the following command to launch the application on your device or emulator:
300 |
301 | ```bash
302 | npx react-native run-android # For Android
303 | npx react-native run-ios # For iOS
304 | ```
305 |
306 | This will build the React Native application and deploy it to the connected device or emulator.
307 |
308 | 4. Once the application is running, you should see the screen with the sections you defined in the `App.tsx` file.
309 |
310 | 5. Check the console logs for the output of the Wasm module's functions. You should see the results of calling the `add` function from both the remotely loaded and locally loaded Wasm modules.
311 |
312 | ```bash
313 | Remote Wasm Result: 3
314 | Local Wasm Result: 7
315 | ```
316 |
317 | This confirms that the Rust Wasm module has been successfully integrated into your React Native application.
318 |
319 | ## Conclusion
320 |
321 | Congratulations! You have successfully set up and integrated the Rust Wasm module into your React Native application using `rust2wasm2react-native`. You can now leverage the power of Rust and WebAssembly to enhance the functionality of your mobile application.
322 |
323 | Feel free to explore and expand upon this project to suit your specific needs. Happy coding!
324 |
325 | ---
326 |
327 | Please note that this documentation assumes you have basic knowledge of Rust, WebAssembly, and React Native development. If you are new to any of these technologies, it is recommended to familiarize yourself with them before proceeding with this project.
328 |
329 | If you encounter any issues or have further questions, please refer to the project repository for additional documentation and support.
330 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - boost (1.76.0)
3 | - CocoaAsyncSocket (7.6.5)
4 | - DoubleConversion (1.1.6)
5 | - FBLazyVector (0.71.10)
6 | - FBReactNativeSpec (0.71.10):
7 | - RCT-Folly (= 2021.07.22.00)
8 | - RCTRequired (= 0.71.10)
9 | - RCTTypeSafety (= 0.71.10)
10 | - React-Core (= 0.71.10)
11 | - React-jsi (= 0.71.10)
12 | - ReactCommon/turbomodule/core (= 0.71.10)
13 | - Flipper (0.125.0):
14 | - Flipper-Folly (~> 2.6)
15 | - Flipper-RSocket (~> 1.4)
16 | - Flipper-Boost-iOSX (1.76.0.1.11)
17 | - Flipper-DoubleConversion (3.2.0.1)
18 | - Flipper-Fmt (7.1.7)
19 | - Flipper-Folly (2.6.10):
20 | - Flipper-Boost-iOSX
21 | - Flipper-DoubleConversion
22 | - Flipper-Fmt (= 7.1.7)
23 | - Flipper-Glog
24 | - libevent (~> 2.1.12)
25 | - OpenSSL-Universal (= 1.1.1100)
26 | - Flipper-Glog (0.5.0.5)
27 | - Flipper-PeerTalk (0.0.4)
28 | - Flipper-RSocket (1.4.3):
29 | - Flipper-Folly (~> 2.6)
30 | - FlipperKit (0.125.0):
31 | - FlipperKit/Core (= 0.125.0)
32 | - FlipperKit/Core (0.125.0):
33 | - Flipper (~> 0.125.0)
34 | - FlipperKit/CppBridge
35 | - FlipperKit/FBCxxFollyDynamicConvert
36 | - FlipperKit/FBDefines
37 | - FlipperKit/FKPortForwarding
38 | - SocketRocket (~> 0.6.0)
39 | - FlipperKit/CppBridge (0.125.0):
40 | - Flipper (~> 0.125.0)
41 | - FlipperKit/FBCxxFollyDynamicConvert (0.125.0):
42 | - Flipper-Folly (~> 2.6)
43 | - FlipperKit/FBDefines (0.125.0)
44 | - FlipperKit/FKPortForwarding (0.125.0):
45 | - CocoaAsyncSocket (~> 7.6)
46 | - Flipper-PeerTalk (~> 0.0.4)
47 | - FlipperKit/FlipperKitHighlightOverlay (0.125.0)
48 | - FlipperKit/FlipperKitLayoutHelpers (0.125.0):
49 | - FlipperKit/Core
50 | - FlipperKit/FlipperKitHighlightOverlay
51 | - FlipperKit/FlipperKitLayoutTextSearchable
52 | - FlipperKit/FlipperKitLayoutIOSDescriptors (0.125.0):
53 | - FlipperKit/Core
54 | - FlipperKit/FlipperKitHighlightOverlay
55 | - FlipperKit/FlipperKitLayoutHelpers
56 | - YogaKit (~> 1.18)
57 | - FlipperKit/FlipperKitLayoutPlugin (0.125.0):
58 | - FlipperKit/Core
59 | - FlipperKit/FlipperKitHighlightOverlay
60 | - FlipperKit/FlipperKitLayoutHelpers
61 | - FlipperKit/FlipperKitLayoutIOSDescriptors
62 | - FlipperKit/FlipperKitLayoutTextSearchable
63 | - YogaKit (~> 1.18)
64 | - FlipperKit/FlipperKitLayoutTextSearchable (0.125.0)
65 | - FlipperKit/FlipperKitNetworkPlugin (0.125.0):
66 | - FlipperKit/Core
67 | - FlipperKit/FlipperKitReactPlugin (0.125.0):
68 | - FlipperKit/Core
69 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.125.0):
70 | - FlipperKit/Core
71 | - FlipperKit/SKIOSNetworkPlugin (0.125.0):
72 | - FlipperKit/Core
73 | - FlipperKit/FlipperKitNetworkPlugin
74 | - fmt (6.2.1)
75 | - glog (0.3.5)
76 | - hermes-engine (0.71.10):
77 | - hermes-engine/Pre-built (= 0.71.10)
78 | - hermes-engine/Pre-built (0.71.10)
79 | - libevent (2.1.12)
80 | - OpenSSL-Universal (1.1.1100)
81 | - RCT-Folly (2021.07.22.00):
82 | - boost
83 | - DoubleConversion
84 | - fmt (~> 6.2.1)
85 | - glog
86 | - RCT-Folly/Default (= 2021.07.22.00)
87 | - RCT-Folly/Default (2021.07.22.00):
88 | - boost
89 | - DoubleConversion
90 | - fmt (~> 6.2.1)
91 | - glog
92 | - RCT-Folly/Futures (2021.07.22.00):
93 | - boost
94 | - DoubleConversion
95 | - fmt (~> 6.2.1)
96 | - glog
97 | - libevent
98 | - RCTRequired (0.71.10)
99 | - RCTTypeSafety (0.71.10):
100 | - FBLazyVector (= 0.71.10)
101 | - RCTRequired (= 0.71.10)
102 | - React-Core (= 0.71.10)
103 | - React (0.71.10):
104 | - React-Core (= 0.71.10)
105 | - React-Core/DevSupport (= 0.71.10)
106 | - React-Core/RCTWebSocket (= 0.71.10)
107 | - React-RCTActionSheet (= 0.71.10)
108 | - React-RCTAnimation (= 0.71.10)
109 | - React-RCTBlob (= 0.71.10)
110 | - React-RCTImage (= 0.71.10)
111 | - React-RCTLinking (= 0.71.10)
112 | - React-RCTNetwork (= 0.71.10)
113 | - React-RCTSettings (= 0.71.10)
114 | - React-RCTText (= 0.71.10)
115 | - React-RCTVibration (= 0.71.10)
116 | - React-callinvoker (0.71.10)
117 | - React-Codegen (0.71.10):
118 | - FBReactNativeSpec
119 | - hermes-engine
120 | - RCT-Folly
121 | - RCTRequired
122 | - RCTTypeSafety
123 | - React-Core
124 | - React-jsi
125 | - React-jsiexecutor
126 | - ReactCommon/turbomodule/bridging
127 | - ReactCommon/turbomodule/core
128 | - React-Core (0.71.10):
129 | - glog
130 | - hermes-engine
131 | - RCT-Folly (= 2021.07.22.00)
132 | - React-Core/Default (= 0.71.10)
133 | - React-cxxreact (= 0.71.10)
134 | - React-hermes
135 | - React-jsi (= 0.71.10)
136 | - React-jsiexecutor (= 0.71.10)
137 | - React-perflogger (= 0.71.10)
138 | - Yoga
139 | - React-Core/CoreModulesHeaders (0.71.10):
140 | - glog
141 | - hermes-engine
142 | - RCT-Folly (= 2021.07.22.00)
143 | - React-Core/Default
144 | - React-cxxreact (= 0.71.10)
145 | - React-hermes
146 | - React-jsi (= 0.71.10)
147 | - React-jsiexecutor (= 0.71.10)
148 | - React-perflogger (= 0.71.10)
149 | - Yoga
150 | - React-Core/Default (0.71.10):
151 | - glog
152 | - hermes-engine
153 | - RCT-Folly (= 2021.07.22.00)
154 | - React-cxxreact (= 0.71.10)
155 | - React-hermes
156 | - React-jsi (= 0.71.10)
157 | - React-jsiexecutor (= 0.71.10)
158 | - React-perflogger (= 0.71.10)
159 | - Yoga
160 | - React-Core/DevSupport (0.71.10):
161 | - glog
162 | - hermes-engine
163 | - RCT-Folly (= 2021.07.22.00)
164 | - React-Core/Default (= 0.71.10)
165 | - React-Core/RCTWebSocket (= 0.71.10)
166 | - React-cxxreact (= 0.71.10)
167 | - React-hermes
168 | - React-jsi (= 0.71.10)
169 | - React-jsiexecutor (= 0.71.10)
170 | - React-jsinspector (= 0.71.10)
171 | - React-perflogger (= 0.71.10)
172 | - Yoga
173 | - React-Core/RCTActionSheetHeaders (0.71.10):
174 | - glog
175 | - hermes-engine
176 | - RCT-Folly (= 2021.07.22.00)
177 | - React-Core/Default
178 | - React-cxxreact (= 0.71.10)
179 | - React-hermes
180 | - React-jsi (= 0.71.10)
181 | - React-jsiexecutor (= 0.71.10)
182 | - React-perflogger (= 0.71.10)
183 | - Yoga
184 | - React-Core/RCTAnimationHeaders (0.71.10):
185 | - glog
186 | - hermes-engine
187 | - RCT-Folly (= 2021.07.22.00)
188 | - React-Core/Default
189 | - React-cxxreact (= 0.71.10)
190 | - React-hermes
191 | - React-jsi (= 0.71.10)
192 | - React-jsiexecutor (= 0.71.10)
193 | - React-perflogger (= 0.71.10)
194 | - Yoga
195 | - React-Core/RCTBlobHeaders (0.71.10):
196 | - glog
197 | - hermes-engine
198 | - RCT-Folly (= 2021.07.22.00)
199 | - React-Core/Default
200 | - React-cxxreact (= 0.71.10)
201 | - React-hermes
202 | - React-jsi (= 0.71.10)
203 | - React-jsiexecutor (= 0.71.10)
204 | - React-perflogger (= 0.71.10)
205 | - Yoga
206 | - React-Core/RCTImageHeaders (0.71.10):
207 | - glog
208 | - hermes-engine
209 | - RCT-Folly (= 2021.07.22.00)
210 | - React-Core/Default
211 | - React-cxxreact (= 0.71.10)
212 | - React-hermes
213 | - React-jsi (= 0.71.10)
214 | - React-jsiexecutor (= 0.71.10)
215 | - React-perflogger (= 0.71.10)
216 | - Yoga
217 | - React-Core/RCTLinkingHeaders (0.71.10):
218 | - glog
219 | - hermes-engine
220 | - RCT-Folly (= 2021.07.22.00)
221 | - React-Core/Default
222 | - React-cxxreact (= 0.71.10)
223 | - React-hermes
224 | - React-jsi (= 0.71.10)
225 | - React-jsiexecutor (= 0.71.10)
226 | - React-perflogger (= 0.71.10)
227 | - Yoga
228 | - React-Core/RCTNetworkHeaders (0.71.10):
229 | - glog
230 | - hermes-engine
231 | - RCT-Folly (= 2021.07.22.00)
232 | - React-Core/Default
233 | - React-cxxreact (= 0.71.10)
234 | - React-hermes
235 | - React-jsi (= 0.71.10)
236 | - React-jsiexecutor (= 0.71.10)
237 | - React-perflogger (= 0.71.10)
238 | - Yoga
239 | - React-Core/RCTSettingsHeaders (0.71.10):
240 | - glog
241 | - hermes-engine
242 | - RCT-Folly (= 2021.07.22.00)
243 | - React-Core/Default
244 | - React-cxxreact (= 0.71.10)
245 | - React-hermes
246 | - React-jsi (= 0.71.10)
247 | - React-jsiexecutor (= 0.71.10)
248 | - React-perflogger (= 0.71.10)
249 | - Yoga
250 | - React-Core/RCTTextHeaders (0.71.10):
251 | - glog
252 | - hermes-engine
253 | - RCT-Folly (= 2021.07.22.00)
254 | - React-Core/Default
255 | - React-cxxreact (= 0.71.10)
256 | - React-hermes
257 | - React-jsi (= 0.71.10)
258 | - React-jsiexecutor (= 0.71.10)
259 | - React-perflogger (= 0.71.10)
260 | - Yoga
261 | - React-Core/RCTVibrationHeaders (0.71.10):
262 | - glog
263 | - hermes-engine
264 | - RCT-Folly (= 2021.07.22.00)
265 | - React-Core/Default
266 | - React-cxxreact (= 0.71.10)
267 | - React-hermes
268 | - React-jsi (= 0.71.10)
269 | - React-jsiexecutor (= 0.71.10)
270 | - React-perflogger (= 0.71.10)
271 | - Yoga
272 | - React-Core/RCTWebSocket (0.71.10):
273 | - glog
274 | - hermes-engine
275 | - RCT-Folly (= 2021.07.22.00)
276 | - React-Core/Default (= 0.71.10)
277 | - React-cxxreact (= 0.71.10)
278 | - React-hermes
279 | - React-jsi (= 0.71.10)
280 | - React-jsiexecutor (= 0.71.10)
281 | - React-perflogger (= 0.71.10)
282 | - Yoga
283 | - React-CoreModules (0.71.10):
284 | - RCT-Folly (= 2021.07.22.00)
285 | - RCTTypeSafety (= 0.71.10)
286 | - React-Codegen (= 0.71.10)
287 | - React-Core/CoreModulesHeaders (= 0.71.10)
288 | - React-jsi (= 0.71.10)
289 | - React-RCTBlob
290 | - React-RCTImage (= 0.71.10)
291 | - ReactCommon/turbomodule/core (= 0.71.10)
292 | - React-cxxreact (0.71.10):
293 | - boost (= 1.76.0)
294 | - DoubleConversion
295 | - glog
296 | - hermes-engine
297 | - RCT-Folly (= 2021.07.22.00)
298 | - React-callinvoker (= 0.71.10)
299 | - React-jsi (= 0.71.10)
300 | - React-jsinspector (= 0.71.10)
301 | - React-logger (= 0.71.10)
302 | - React-perflogger (= 0.71.10)
303 | - React-runtimeexecutor (= 0.71.10)
304 | - React-hermes (0.71.10):
305 | - DoubleConversion
306 | - glog
307 | - hermes-engine
308 | - RCT-Folly (= 2021.07.22.00)
309 | - RCT-Folly/Futures (= 2021.07.22.00)
310 | - React-cxxreact (= 0.71.10)
311 | - React-jsi
312 | - React-jsiexecutor (= 0.71.10)
313 | - React-jsinspector (= 0.71.10)
314 | - React-perflogger (= 0.71.10)
315 | - React-jsi (0.71.10):
316 | - boost (= 1.76.0)
317 | - DoubleConversion
318 | - glog
319 | - hermes-engine
320 | - RCT-Folly (= 2021.07.22.00)
321 | - React-jsiexecutor (0.71.10):
322 | - DoubleConversion
323 | - glog
324 | - hermes-engine
325 | - RCT-Folly (= 2021.07.22.00)
326 | - React-cxxreact (= 0.71.10)
327 | - React-jsi (= 0.71.10)
328 | - React-perflogger (= 0.71.10)
329 | - React-jsinspector (0.71.10)
330 | - React-logger (0.71.10):
331 | - glog
332 | - react-native-webassembly (0.3.3):
333 | - RCT-Folly
334 | - RCTRequired
335 | - RCTTypeSafety
336 | - React-Codegen
337 | - React-Core
338 | - ReactCommon/turbomodule/core
339 | - React-perflogger (0.71.10)
340 | - React-RCTActionSheet (0.71.10):
341 | - React-Core/RCTActionSheetHeaders (= 0.71.10)
342 | - React-RCTAnimation (0.71.10):
343 | - RCT-Folly (= 2021.07.22.00)
344 | - RCTTypeSafety (= 0.71.10)
345 | - React-Codegen (= 0.71.10)
346 | - React-Core/RCTAnimationHeaders (= 0.71.10)
347 | - React-jsi (= 0.71.10)
348 | - ReactCommon/turbomodule/core (= 0.71.10)
349 | - React-RCTAppDelegate (0.71.10):
350 | - RCT-Folly
351 | - RCTRequired
352 | - RCTTypeSafety
353 | - React-Core
354 | - ReactCommon/turbomodule/core
355 | - React-RCTBlob (0.71.10):
356 | - hermes-engine
357 | - RCT-Folly (= 2021.07.22.00)
358 | - React-Codegen (= 0.71.10)
359 | - React-Core/RCTBlobHeaders (= 0.71.10)
360 | - React-Core/RCTWebSocket (= 0.71.10)
361 | - React-jsi (= 0.71.10)
362 | - React-RCTNetwork (= 0.71.10)
363 | - ReactCommon/turbomodule/core (= 0.71.10)
364 | - React-RCTImage (0.71.10):
365 | - RCT-Folly (= 2021.07.22.00)
366 | - RCTTypeSafety (= 0.71.10)
367 | - React-Codegen (= 0.71.10)
368 | - React-Core/RCTImageHeaders (= 0.71.10)
369 | - React-jsi (= 0.71.10)
370 | - React-RCTNetwork (= 0.71.10)
371 | - ReactCommon/turbomodule/core (= 0.71.10)
372 | - React-RCTLinking (0.71.10):
373 | - React-Codegen (= 0.71.10)
374 | - React-Core/RCTLinkingHeaders (= 0.71.10)
375 | - React-jsi (= 0.71.10)
376 | - ReactCommon/turbomodule/core (= 0.71.10)
377 | - React-RCTNetwork (0.71.10):
378 | - RCT-Folly (= 2021.07.22.00)
379 | - RCTTypeSafety (= 0.71.10)
380 | - React-Codegen (= 0.71.10)
381 | - React-Core/RCTNetworkHeaders (= 0.71.10)
382 | - React-jsi (= 0.71.10)
383 | - ReactCommon/turbomodule/core (= 0.71.10)
384 | - React-RCTSettings (0.71.10):
385 | - RCT-Folly (= 2021.07.22.00)
386 | - RCTTypeSafety (= 0.71.10)
387 | - React-Codegen (= 0.71.10)
388 | - React-Core/RCTSettingsHeaders (= 0.71.10)
389 | - React-jsi (= 0.71.10)
390 | - ReactCommon/turbomodule/core (= 0.71.10)
391 | - React-RCTText (0.71.10):
392 | - React-Core/RCTTextHeaders (= 0.71.10)
393 | - React-RCTVibration (0.71.10):
394 | - RCT-Folly (= 2021.07.22.00)
395 | - React-Codegen (= 0.71.10)
396 | - React-Core/RCTVibrationHeaders (= 0.71.10)
397 | - React-jsi (= 0.71.10)
398 | - ReactCommon/turbomodule/core (= 0.71.10)
399 | - React-runtimeexecutor (0.71.10):
400 | - React-jsi (= 0.71.10)
401 | - ReactCommon/turbomodule/bridging (0.71.10):
402 | - DoubleConversion
403 | - glog
404 | - hermes-engine
405 | - RCT-Folly (= 2021.07.22.00)
406 | - React-callinvoker (= 0.71.10)
407 | - React-Core (= 0.71.10)
408 | - React-cxxreact (= 0.71.10)
409 | - React-jsi (= 0.71.10)
410 | - React-logger (= 0.71.10)
411 | - React-perflogger (= 0.71.10)
412 | - ReactCommon/turbomodule/core (0.71.10):
413 | - DoubleConversion
414 | - glog
415 | - hermes-engine
416 | - RCT-Folly (= 2021.07.22.00)
417 | - React-callinvoker (= 0.71.10)
418 | - React-Core (= 0.71.10)
419 | - React-cxxreact (= 0.71.10)
420 | - React-jsi (= 0.71.10)
421 | - React-logger (= 0.71.10)
422 | - React-perflogger (= 0.71.10)
423 | - RNFS (2.20.0):
424 | - React-Core
425 | - SocketRocket (0.6.0)
426 | - Yoga (1.14.0)
427 | - YogaKit (1.18.1):
428 | - Yoga (~> 1.14)
429 |
430 | DEPENDENCIES:
431 | - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
432 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
433 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
434 | - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
435 | - Flipper (= 0.125.0)
436 | - Flipper-Boost-iOSX (= 1.76.0.1.11)
437 | - Flipper-DoubleConversion (= 3.2.0.1)
438 | - Flipper-Fmt (= 7.1.7)
439 | - Flipper-Folly (= 2.6.10)
440 | - Flipper-Glog (= 0.5.0.5)
441 | - Flipper-PeerTalk (= 0.0.4)
442 | - Flipper-RSocket (= 1.4.3)
443 | - FlipperKit (= 0.125.0)
444 | - FlipperKit/Core (= 0.125.0)
445 | - FlipperKit/CppBridge (= 0.125.0)
446 | - FlipperKit/FBCxxFollyDynamicConvert (= 0.125.0)
447 | - FlipperKit/FBDefines (= 0.125.0)
448 | - FlipperKit/FKPortForwarding (= 0.125.0)
449 | - FlipperKit/FlipperKitHighlightOverlay (= 0.125.0)
450 | - FlipperKit/FlipperKitLayoutPlugin (= 0.125.0)
451 | - FlipperKit/FlipperKitLayoutTextSearchable (= 0.125.0)
452 | - FlipperKit/FlipperKitNetworkPlugin (= 0.125.0)
453 | - FlipperKit/FlipperKitReactPlugin (= 0.125.0)
454 | - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0)
455 | - FlipperKit/SKIOSNetworkPlugin (= 0.125.0)
456 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
457 | - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
458 | - libevent (~> 2.1.12)
459 | - OpenSSL-Universal (= 1.1.1100)
460 | - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
461 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
462 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
463 | - React (from `../node_modules/react-native/`)
464 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
465 | - React-Codegen (from `build/generated/ios`)
466 | - React-Core (from `../node_modules/react-native/`)
467 | - React-Core/DevSupport (from `../node_modules/react-native/`)
468 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`)
469 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
470 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
471 | - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`)
472 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
473 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
474 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
475 | - React-logger (from `../node_modules/react-native/ReactCommon/logger`)
476 | - react-native-webassembly (from `../node_modules/react-native-webassembly`)
477 | - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
478 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
479 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
480 | - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`)
481 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
482 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
483 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
484 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
485 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
486 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`)
487 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
488 | - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
489 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
490 | - RNFS (from `../node_modules/react-native-fs`)
491 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
492 |
493 | SPEC REPOS:
494 | trunk:
495 | - CocoaAsyncSocket
496 | - Flipper
497 | - Flipper-Boost-iOSX
498 | - Flipper-DoubleConversion
499 | - Flipper-Fmt
500 | - Flipper-Folly
501 | - Flipper-Glog
502 | - Flipper-PeerTalk
503 | - Flipper-RSocket
504 | - FlipperKit
505 | - fmt
506 | - libevent
507 | - OpenSSL-Universal
508 | - SocketRocket
509 | - YogaKit
510 |
511 | EXTERNAL SOURCES:
512 | boost:
513 | :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
514 | DoubleConversion:
515 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
516 | FBLazyVector:
517 | :path: "../node_modules/react-native/Libraries/FBLazyVector"
518 | FBReactNativeSpec:
519 | :path: "../node_modules/react-native/React/FBReactNativeSpec"
520 | glog:
521 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
522 | hermes-engine:
523 | :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec"
524 | RCT-Folly:
525 | :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
526 | RCTRequired:
527 | :path: "../node_modules/react-native/Libraries/RCTRequired"
528 | RCTTypeSafety:
529 | :path: "../node_modules/react-native/Libraries/TypeSafety"
530 | React:
531 | :path: "../node_modules/react-native/"
532 | React-callinvoker:
533 | :path: "../node_modules/react-native/ReactCommon/callinvoker"
534 | React-Codegen:
535 | :path: build/generated/ios
536 | React-Core:
537 | :path: "../node_modules/react-native/"
538 | React-CoreModules:
539 | :path: "../node_modules/react-native/React/CoreModules"
540 | React-cxxreact:
541 | :path: "../node_modules/react-native/ReactCommon/cxxreact"
542 | React-hermes:
543 | :path: "../node_modules/react-native/ReactCommon/hermes"
544 | React-jsi:
545 | :path: "../node_modules/react-native/ReactCommon/jsi"
546 | React-jsiexecutor:
547 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
548 | React-jsinspector:
549 | :path: "../node_modules/react-native/ReactCommon/jsinspector"
550 | React-logger:
551 | :path: "../node_modules/react-native/ReactCommon/logger"
552 | react-native-webassembly:
553 | :path: "../node_modules/react-native-webassembly"
554 | React-perflogger:
555 | :path: "../node_modules/react-native/ReactCommon/reactperflogger"
556 | React-RCTActionSheet:
557 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS"
558 | React-RCTAnimation:
559 | :path: "../node_modules/react-native/Libraries/NativeAnimation"
560 | React-RCTAppDelegate:
561 | :path: "../node_modules/react-native/Libraries/AppDelegate"
562 | React-RCTBlob:
563 | :path: "../node_modules/react-native/Libraries/Blob"
564 | React-RCTImage:
565 | :path: "../node_modules/react-native/Libraries/Image"
566 | React-RCTLinking:
567 | :path: "../node_modules/react-native/Libraries/LinkingIOS"
568 | React-RCTNetwork:
569 | :path: "../node_modules/react-native/Libraries/Network"
570 | React-RCTSettings:
571 | :path: "../node_modules/react-native/Libraries/Settings"
572 | React-RCTText:
573 | :path: "../node_modules/react-native/Libraries/Text"
574 | React-RCTVibration:
575 | :path: "../node_modules/react-native/Libraries/Vibration"
576 | React-runtimeexecutor:
577 | :path: "../node_modules/react-native/ReactCommon/runtimeexecutor"
578 | ReactCommon:
579 | :path: "../node_modules/react-native/ReactCommon"
580 | RNFS:
581 | :path: "../node_modules/react-native-fs"
582 | Yoga:
583 | :path: "../node_modules/react-native/ReactCommon/yoga"
584 |
585 | SPEC CHECKSUMS:
586 | boost: 57d2868c099736d80fcd648bf211b4431e51a558
587 | CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
588 | DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
589 | FBLazyVector: ddb55c55295ea51ed98aa7e2e08add2f826309d5
590 | FBReactNativeSpec: 90fc1a90b4b7a171e0a7c20ea426c1bf6ce4399c
591 | Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0
592 | Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
593 | Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30
594 | Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b
595 | Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3
596 | Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446
597 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
598 | Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541
599 | FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86
600 | fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
601 | glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
602 | hermes-engine: d27603b55a48402501ad1928c05411dae9cd6b85
603 | libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
604 | OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
605 | RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
606 | RCTRequired: 8ef706f91e2b643cd32c26a57700b5f24fab0585
607 | RCTTypeSafety: 5fbddd8eb9242b91ac0d901c01da3673f358b1b7
608 | React: e5d2d559e89d256a1d6da64d51adaecda9c8ddae
609 | React-callinvoker: 352ecbafbdccca5fdf4aed99c98ae5b7fc28e39b
610 | React-Codegen: fa660a71e24078b2e52a62ecc2f3048c2f8ae6d7
611 | React-Core: 4ec45c2d537fe58e6d878bec6a13e3e2bed9c182
612 | React-CoreModules: 63f7f9fda3d4b214040a80e3f47ab4fb9a3e88e6
613 | React-cxxreact: 1a729807190ebf98ce5fb0c3d2ed211e8b5f2f87
614 | React-hermes: eb93eb6e7921ecd4abcc6e741b327f40763e850f
615 | React-jsi: 1995961abdff0c9af9aae8a6b24468f21811000e
616 | React-jsiexecutor: 4bb480a183a354e4dbfb1012936b1a2bb9357de7
617 | React-jsinspector: cdc854f8b13abd202afa54bc12578e5afb9cfae1
618 | React-logger: ef2269b3afa6ba868da90496c3e17a4ec4f4cee0
619 | react-native-webassembly: bdd67f75a6145cbfdb3ab8de4ee0381f89e6b140
620 | React-perflogger: 217095464d5c4bb70df0742fa86bf2a363693468
621 | React-RCTActionSheet: 8deae9b85a4cbc6a2243618ea62a374880a2c614
622 | React-RCTAnimation: 59c62353a8b59ce206044786c5d30e4754bffa64
623 | React-RCTAppDelegate: ef66a6904141fca96bffb00fac327a482b575f19
624 | React-RCTBlob: 8e518bae3d6ca97ffb7088da673fbbc53042d94d
625 | React-RCTImage: 36c0324ff499802b9874d6803ca72026e90434f6
626 | React-RCTLinking: 401aec3a01b18c2c8ed93bf3a6758b87e617c58d
627 | React-RCTNetwork: cb25b9f2737c3aa2cde0fe0bd7ff7fabf7bf9ad0
628 | React-RCTSettings: cb6ae9f656e1c880500c2ecbe8e72861c2262afa
629 | React-RCTText: 7404fd01809244d79d456f92cfe6f9fbadf69209
630 | React-RCTVibration: d13cc2d63286c633393d3a7f6f607cc2a09ec011
631 | React-runtimeexecutor: a9a1cd79996c9a0846e3232ecb25c64e1cc0172e
632 | ReactCommon: 65718685d4095d06b4b1af8042e12f1df2925c31
633 | RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
634 | SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
635 | Yoga: e7ea9e590e27460d28911403b894722354d73479
636 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
637 |
638 | PODFILE CHECKSUM: 0ecf892418aaa2c3cfbcc16f3fa824b19647500f
639 |
640 | COCOAPODS: 1.12.1
641 |
--------------------------------------------------------------------------------
/ReactNativeWasmBridgeApp/ios/ReactNativeWasmBridgeApp.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 00E356F31AD99517003FC87E /* ReactNativeWasmBridgeAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ReactNativeWasmBridgeAppTests.m */; };
11 | 0C80B921A6F3F58F76C31292 /* libPods-ReactNativeWasmBridgeApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-ReactNativeWasmBridgeApp.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-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.a */; };
16 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
17 | 958DEB9C2A33338100FBF7E0 /* rust_lib.wasm in Resources */ = {isa = PBXBuildFile; fileRef = 958DEB9B2A33338100FBF7E0 /* rust_lib.wasm */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXContainerItemProxy section */
21 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
22 | isa = PBXContainerItemProxy;
23 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
24 | proxyType = 1;
25 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
26 | remoteInfo = ReactNativeWasmBridgeApp;
27 | };
28 | /* End PBXContainerItemProxy section */
29 |
30 | /* Begin PBXFileReference section */
31 | 00E356EE1AD99517003FC87E /* ReactNativeWasmBridgeAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ReactNativeWasmBridgeAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
32 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
33 | 00E356F21AD99517003FC87E /* ReactNativeWasmBridgeAppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReactNativeWasmBridgeAppTests.m; sourceTree = ""; };
34 | 13B07F961A680F5B00A75B9A /* ReactNativeWasmBridgeApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ReactNativeWasmBridgeApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
35 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ReactNativeWasmBridgeApp/AppDelegate.h; sourceTree = ""; };
36 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = ReactNativeWasmBridgeApp/AppDelegate.mm; sourceTree = ""; };
37 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ReactNativeWasmBridgeApp/Images.xcassets; sourceTree = ""; };
38 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ReactNativeWasmBridgeApp/Info.plist; sourceTree = ""; };
39 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ReactNativeWasmBridgeApp/main.m; sourceTree = ""; };
40 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 3B4392A12AC88292D35C810B /* Pods-ReactNativeWasmBridgeApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeWasmBridgeApp.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativeWasmBridgeApp/Pods-ReactNativeWasmBridgeApp.debug.xcconfig"; sourceTree = ""; };
42 | 5709B34CF0A7D63546082F79 /* Pods-ReactNativeWasmBridgeApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeWasmBridgeApp.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeWasmBridgeApp/Pods-ReactNativeWasmBridgeApp.release.xcconfig"; sourceTree = ""; };
43 | 5B7EB9410499542E8C5724F5 /* Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.debug.xcconfig"; sourceTree = ""; };
44 | 5DCACB8F33CDC322A6C60F78 /* libPods-ReactNativeWasmBridgeApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ReactNativeWasmBridgeApp.a"; sourceTree = BUILT_PRODUCTS_DIR; };
45 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ReactNativeWasmBridgeApp/LaunchScreen.storyboard; sourceTree = ""; };
46 | 89C6BE57DB24E9ADA2F236DE /* Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.release.xcconfig"; sourceTree = ""; };
47 | 958DEB9B2A33338100FBF7E0 /* rust_lib.wasm */ = {isa = PBXFileReference; lastKnownFileType = file; name = rust_lib.wasm; path = ../assets/rust_lib.wasm; sourceTree = ""; };
48 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
49 | /* End PBXFileReference section */
50 |
51 | /* Begin PBXFrameworksBuildPhase section */
52 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
53 | isa = PBXFrameworksBuildPhase;
54 | buildActionMask = 2147483647;
55 | files = (
56 | 7699B88040F8A987B510C191 /* libPods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.a in Frameworks */,
57 | );
58 | runOnlyForDeploymentPostprocessing = 0;
59 | };
60 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
61 | isa = PBXFrameworksBuildPhase;
62 | buildActionMask = 2147483647;
63 | files = (
64 | 0C80B921A6F3F58F76C31292 /* libPods-ReactNativeWasmBridgeApp.a in Frameworks */,
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | /* End PBXFrameworksBuildPhase section */
69 |
70 | /* Begin PBXGroup section */
71 | 00E356EF1AD99517003FC87E /* ReactNativeWasmBridgeAppTests */ = {
72 | isa = PBXGroup;
73 | children = (
74 | 00E356F21AD99517003FC87E /* ReactNativeWasmBridgeAppTests.m */,
75 | 00E356F01AD99517003FC87E /* Supporting Files */,
76 | );
77 | path = ReactNativeWasmBridgeAppTests;
78 | sourceTree = "";
79 | };
80 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
81 | isa = PBXGroup;
82 | children = (
83 | 00E356F11AD99517003FC87E /* Info.plist */,
84 | );
85 | name = "Supporting Files";
86 | sourceTree = "";
87 | };
88 | 13B07FAE1A68108700A75B9A /* ReactNativeWasmBridgeApp */ = {
89 | isa = PBXGroup;
90 | children = (
91 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
92 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */,
93 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
94 | 13B07FB61A68108700A75B9A /* Info.plist */,
95 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
96 | 13B07FB71A68108700A75B9A /* main.m */,
97 | );
98 | name = ReactNativeWasmBridgeApp;
99 | sourceTree = "";
100 | };
101 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
102 | isa = PBXGroup;
103 | children = (
104 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
105 | 5DCACB8F33CDC322A6C60F78 /* libPods-ReactNativeWasmBridgeApp.a */,
106 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.a */,
107 | );
108 | name = Frameworks;
109 | sourceTree = "";
110 | };
111 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
112 | isa = PBXGroup;
113 | children = (
114 | );
115 | name = Libraries;
116 | sourceTree = "";
117 | };
118 | 83CBB9F61A601CBA00E9B192 = {
119 | isa = PBXGroup;
120 | children = (
121 | 958DEB9B2A33338100FBF7E0 /* rust_lib.wasm */,
122 | 13B07FAE1A68108700A75B9A /* ReactNativeWasmBridgeApp */,
123 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
124 | 00E356EF1AD99517003FC87E /* ReactNativeWasmBridgeAppTests */,
125 | 83CBBA001A601CBA00E9B192 /* Products */,
126 | 2D16E6871FA4F8E400B85C8A /* Frameworks */,
127 | BBD78D7AC51CEA395F1C20DB /* Pods */,
128 | );
129 | indentWidth = 2;
130 | sourceTree = "";
131 | tabWidth = 2;
132 | usesTabs = 0;
133 | };
134 | 83CBBA001A601CBA00E9B192 /* Products */ = {
135 | isa = PBXGroup;
136 | children = (
137 | 13B07F961A680F5B00A75B9A /* ReactNativeWasmBridgeApp.app */,
138 | 00E356EE1AD99517003FC87E /* ReactNativeWasmBridgeAppTests.xctest */,
139 | );
140 | name = Products;
141 | sourceTree = "";
142 | };
143 | BBD78D7AC51CEA395F1C20DB /* Pods */ = {
144 | isa = PBXGroup;
145 | children = (
146 | 3B4392A12AC88292D35C810B /* Pods-ReactNativeWasmBridgeApp.debug.xcconfig */,
147 | 5709B34CF0A7D63546082F79 /* Pods-ReactNativeWasmBridgeApp.release.xcconfig */,
148 | 5B7EB9410499542E8C5724F5 /* Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.debug.xcconfig */,
149 | 89C6BE57DB24E9ADA2F236DE /* Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.release.xcconfig */,
150 | );
151 | path = Pods;
152 | sourceTree = "";
153 | };
154 | /* End PBXGroup section */
155 |
156 | /* Begin PBXNativeTarget section */
157 | 00E356ED1AD99517003FC87E /* ReactNativeWasmBridgeAppTests */ = {
158 | isa = PBXNativeTarget;
159 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ReactNativeWasmBridgeAppTests" */;
160 | buildPhases = (
161 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */,
162 | 00E356EA1AD99517003FC87E /* Sources */,
163 | 00E356EB1AD99517003FC87E /* Frameworks */,
164 | 00E356EC1AD99517003FC87E /* Resources */,
165 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */,
166 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */,
167 | );
168 | buildRules = (
169 | );
170 | dependencies = (
171 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
172 | );
173 | name = ReactNativeWasmBridgeAppTests;
174 | productName = ReactNativeWasmBridgeAppTests;
175 | productReference = 00E356EE1AD99517003FC87E /* ReactNativeWasmBridgeAppTests.xctest */;
176 | productType = "com.apple.product-type.bundle.unit-test";
177 | };
178 | 13B07F861A680F5B00A75B9A /* ReactNativeWasmBridgeApp */ = {
179 | isa = PBXNativeTarget;
180 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativeWasmBridgeApp" */;
181 | buildPhases = (
182 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
183 | FD10A7F022414F080027D42C /* Start Packager */,
184 | 13B07F871A680F5B00A75B9A /* Sources */,
185 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
186 | 13B07F8E1A680F5B00A75B9A /* Resources */,
187 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
188 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */,
189 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */,
190 | );
191 | buildRules = (
192 | );
193 | dependencies = (
194 | );
195 | name = ReactNativeWasmBridgeApp;
196 | productName = ReactNativeWasmBridgeApp;
197 | productReference = 13B07F961A680F5B00A75B9A /* ReactNativeWasmBridgeApp.app */;
198 | productType = "com.apple.product-type.application";
199 | };
200 | /* End PBXNativeTarget section */
201 |
202 | /* Begin PBXProject section */
203 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
204 | isa = PBXProject;
205 | attributes = {
206 | LastUpgradeCheck = 1210;
207 | TargetAttributes = {
208 | 00E356ED1AD99517003FC87E = {
209 | CreatedOnToolsVersion = 6.2;
210 | TestTargetID = 13B07F861A680F5B00A75B9A;
211 | };
212 | 13B07F861A680F5B00A75B9A = {
213 | LastSwiftMigration = 1120;
214 | };
215 | };
216 | };
217 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ReactNativeWasmBridgeApp" */;
218 | compatibilityVersion = "Xcode 12.0";
219 | developmentRegion = en;
220 | hasScannedForEncodings = 0;
221 | knownRegions = (
222 | en,
223 | Base,
224 | );
225 | mainGroup = 83CBB9F61A601CBA00E9B192;
226 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
227 | projectDirPath = "";
228 | projectRoot = "";
229 | targets = (
230 | 13B07F861A680F5B00A75B9A /* ReactNativeWasmBridgeApp */,
231 | 00E356ED1AD99517003FC87E /* ReactNativeWasmBridgeAppTests */,
232 | );
233 | };
234 | /* End PBXProject section */
235 |
236 | /* Begin PBXResourcesBuildPhase section */
237 | 00E356EC1AD99517003FC87E /* Resources */ = {
238 | isa = PBXResourcesBuildPhase;
239 | buildActionMask = 2147483647;
240 | files = (
241 | );
242 | runOnlyForDeploymentPostprocessing = 0;
243 | };
244 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
245 | isa = PBXResourcesBuildPhase;
246 | buildActionMask = 2147483647;
247 | files = (
248 | 958DEB9C2A33338100FBF7E0 /* rust_lib.wasm in Resources */,
249 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
250 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
251 | );
252 | runOnlyForDeploymentPostprocessing = 0;
253 | };
254 | /* End PBXResourcesBuildPhase section */
255 |
256 | /* Begin PBXShellScriptBuildPhase section */
257 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
258 | isa = PBXShellScriptBuildPhase;
259 | buildActionMask = 2147483647;
260 | files = (
261 | );
262 | inputPaths = (
263 | "$(SRCROOT)/.xcode.env.local",
264 | "$(SRCROOT)/.xcode.env",
265 | );
266 | name = "Bundle React Native code and images";
267 | outputPaths = (
268 | );
269 | runOnlyForDeploymentPostprocessing = 0;
270 | shellPath = /bin/sh;
271 | 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";
272 | };
273 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
274 | isa = PBXShellScriptBuildPhase;
275 | buildActionMask = 2147483647;
276 | files = (
277 | );
278 | inputFileListPaths = (
279 | "${PODS_ROOT}/Target Support Files/Pods-ReactNativeWasmBridgeApp/Pods-ReactNativeWasmBridgeApp-frameworks-${CONFIGURATION}-input-files.xcfilelist",
280 | );
281 | name = "[CP] Embed Pods Frameworks";
282 | outputFileListPaths = (
283 | "${PODS_ROOT}/Target Support Files/Pods-ReactNativeWasmBridgeApp/Pods-ReactNativeWasmBridgeApp-frameworks-${CONFIGURATION}-output-files.xcfilelist",
284 | );
285 | runOnlyForDeploymentPostprocessing = 0;
286 | shellPath = /bin/sh;
287 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeWasmBridgeApp/Pods-ReactNativeWasmBridgeApp-frameworks.sh\"\n";
288 | showEnvVarsInLog = 0;
289 | };
290 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = {
291 | isa = PBXShellScriptBuildPhase;
292 | buildActionMask = 2147483647;
293 | files = (
294 | );
295 | inputFileListPaths = (
296 | );
297 | inputPaths = (
298 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
299 | "${PODS_ROOT}/Manifest.lock",
300 | );
301 | name = "[CP] Check Pods Manifest.lock";
302 | outputFileListPaths = (
303 | );
304 | outputPaths = (
305 | "$(DERIVED_FILE_DIR)/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests-checkManifestLockResult.txt",
306 | );
307 | runOnlyForDeploymentPostprocessing = 0;
308 | shellPath = /bin/sh;
309 | 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";
310 | showEnvVarsInLog = 0;
311 | };
312 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
313 | isa = PBXShellScriptBuildPhase;
314 | buildActionMask = 2147483647;
315 | files = (
316 | );
317 | inputFileListPaths = (
318 | );
319 | inputPaths = (
320 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
321 | "${PODS_ROOT}/Manifest.lock",
322 | );
323 | name = "[CP] Check Pods Manifest.lock";
324 | outputFileListPaths = (
325 | );
326 | outputPaths = (
327 | "$(DERIVED_FILE_DIR)/Pods-ReactNativeWasmBridgeApp-checkManifestLockResult.txt",
328 | );
329 | runOnlyForDeploymentPostprocessing = 0;
330 | shellPath = /bin/sh;
331 | 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";
332 | showEnvVarsInLog = 0;
333 | };
334 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = {
335 | isa = PBXShellScriptBuildPhase;
336 | buildActionMask = 2147483647;
337 | files = (
338 | );
339 | inputFileListPaths = (
340 | "${PODS_ROOT}/Target Support Files/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
341 | );
342 | name = "[CP] Embed Pods Frameworks";
343 | outputFileListPaths = (
344 | "${PODS_ROOT}/Target Support Files/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
345 | );
346 | runOnlyForDeploymentPostprocessing = 0;
347 | shellPath = /bin/sh;
348 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests-frameworks.sh\"\n";
349 | showEnvVarsInLog = 0;
350 | };
351 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {
352 | isa = PBXShellScriptBuildPhase;
353 | buildActionMask = 2147483647;
354 | files = (
355 | );
356 | inputFileListPaths = (
357 | "${PODS_ROOT}/Target Support Files/Pods-ReactNativeWasmBridgeApp/Pods-ReactNativeWasmBridgeApp-resources-${CONFIGURATION}-input-files.xcfilelist",
358 | );
359 | name = "[CP] Copy Pods Resources";
360 | outputFileListPaths = (
361 | "${PODS_ROOT}/Target Support Files/Pods-ReactNativeWasmBridgeApp/Pods-ReactNativeWasmBridgeApp-resources-${CONFIGURATION}-output-files.xcfilelist",
362 | );
363 | runOnlyForDeploymentPostprocessing = 0;
364 | shellPath = /bin/sh;
365 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeWasmBridgeApp/Pods-ReactNativeWasmBridgeApp-resources.sh\"\n";
366 | showEnvVarsInLog = 0;
367 | };
368 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = {
369 | isa = PBXShellScriptBuildPhase;
370 | buildActionMask = 2147483647;
371 | files = (
372 | );
373 | inputFileListPaths = (
374 | "${PODS_ROOT}/Target Support Files/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests-resources-${CONFIGURATION}-input-files.xcfilelist",
375 | );
376 | name = "[CP] Copy Pods Resources";
377 | outputFileListPaths = (
378 | "${PODS_ROOT}/Target Support Files/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests-resources-${CONFIGURATION}-output-files.xcfilelist",
379 | );
380 | runOnlyForDeploymentPostprocessing = 0;
381 | shellPath = /bin/sh;
382 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests/Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests-resources.sh\"\n";
383 | showEnvVarsInLog = 0;
384 | };
385 | FD10A7F022414F080027D42C /* Start Packager */ = {
386 | isa = PBXShellScriptBuildPhase;
387 | buildActionMask = 2147483647;
388 | files = (
389 | );
390 | inputFileListPaths = (
391 | );
392 | inputPaths = (
393 | );
394 | name = "Start Packager";
395 | outputFileListPaths = (
396 | );
397 | outputPaths = (
398 | );
399 | runOnlyForDeploymentPostprocessing = 0;
400 | shellPath = /bin/sh;
401 | 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";
402 | showEnvVarsInLog = 0;
403 | };
404 | /* End PBXShellScriptBuildPhase section */
405 |
406 | /* Begin PBXSourcesBuildPhase section */
407 | 00E356EA1AD99517003FC87E /* Sources */ = {
408 | isa = PBXSourcesBuildPhase;
409 | buildActionMask = 2147483647;
410 | files = (
411 | 00E356F31AD99517003FC87E /* ReactNativeWasmBridgeAppTests.m in Sources */,
412 | );
413 | runOnlyForDeploymentPostprocessing = 0;
414 | };
415 | 13B07F871A680F5B00A75B9A /* Sources */ = {
416 | isa = PBXSourcesBuildPhase;
417 | buildActionMask = 2147483647;
418 | files = (
419 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
420 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
421 | );
422 | runOnlyForDeploymentPostprocessing = 0;
423 | };
424 | /* End PBXSourcesBuildPhase section */
425 |
426 | /* Begin PBXTargetDependency section */
427 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
428 | isa = PBXTargetDependency;
429 | target = 13B07F861A680F5B00A75B9A /* ReactNativeWasmBridgeApp */;
430 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
431 | };
432 | /* End PBXTargetDependency section */
433 |
434 | /* Begin XCBuildConfiguration section */
435 | 00E356F61AD99517003FC87E /* Debug */ = {
436 | isa = XCBuildConfiguration;
437 | baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.debug.xcconfig */;
438 | buildSettings = {
439 | BUNDLE_LOADER = "$(TEST_HOST)";
440 | GCC_PREPROCESSOR_DEFINITIONS = (
441 | "DEBUG=1",
442 | "$(inherited)",
443 | );
444 | INFOPLIST_FILE = ReactNativeWasmBridgeAppTests/Info.plist;
445 | IPHONEOS_DEPLOYMENT_TARGET = 12.4;
446 | LD_RUNPATH_SEARCH_PATHS = (
447 | "$(inherited)",
448 | "@executable_path/Frameworks",
449 | "@loader_path/Frameworks",
450 | );
451 | OTHER_LDFLAGS = (
452 | "-ObjC",
453 | "-lc++",
454 | "$(inherited)",
455 | );
456 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
457 | PRODUCT_NAME = "$(TARGET_NAME)";
458 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactNativeWasmBridgeApp.app/ReactNativeWasmBridgeApp";
459 | };
460 | name = Debug;
461 | };
462 | 00E356F71AD99517003FC87E /* Release */ = {
463 | isa = XCBuildConfiguration;
464 | baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-ReactNativeWasmBridgeApp-ReactNativeWasmBridgeAppTests.release.xcconfig */;
465 | buildSettings = {
466 | BUNDLE_LOADER = "$(TEST_HOST)";
467 | COPY_PHASE_STRIP = NO;
468 | INFOPLIST_FILE = ReactNativeWasmBridgeAppTests/Info.plist;
469 | IPHONEOS_DEPLOYMENT_TARGET = 12.4;
470 | LD_RUNPATH_SEARCH_PATHS = (
471 | "$(inherited)",
472 | "@executable_path/Frameworks",
473 | "@loader_path/Frameworks",
474 | );
475 | OTHER_LDFLAGS = (
476 | "-ObjC",
477 | "-lc++",
478 | "$(inherited)",
479 | );
480 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
481 | PRODUCT_NAME = "$(TARGET_NAME)";
482 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactNativeWasmBridgeApp.app/ReactNativeWasmBridgeApp";
483 | };
484 | name = Release;
485 | };
486 | 13B07F941A680F5B00A75B9A /* Debug */ = {
487 | isa = XCBuildConfiguration;
488 | baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-ReactNativeWasmBridgeApp.debug.xcconfig */;
489 | buildSettings = {
490 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
491 | CLANG_ENABLE_MODULES = YES;
492 | CURRENT_PROJECT_VERSION = 1;
493 | ENABLE_BITCODE = NO;
494 | INFOPLIST_FILE = ReactNativeWasmBridgeApp/Info.plist;
495 | LD_RUNPATH_SEARCH_PATHS = (
496 | "$(inherited)",
497 | "@executable_path/Frameworks",
498 | );
499 | MARKETING_VERSION = 1.0;
500 | OTHER_LDFLAGS = (
501 | "$(inherited)",
502 | "-ObjC",
503 | "-lc++",
504 | );
505 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
506 | PRODUCT_NAME = ReactNativeWasmBridgeApp;
507 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
508 | SWIFT_VERSION = 5.0;
509 | VERSIONING_SYSTEM = "apple-generic";
510 | };
511 | name = Debug;
512 | };
513 | 13B07F951A680F5B00A75B9A /* Release */ = {
514 | isa = XCBuildConfiguration;
515 | baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-ReactNativeWasmBridgeApp.release.xcconfig */;
516 | buildSettings = {
517 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
518 | CLANG_ENABLE_MODULES = YES;
519 | CURRENT_PROJECT_VERSION = 1;
520 | INFOPLIST_FILE = ReactNativeWasmBridgeApp/Info.plist;
521 | LD_RUNPATH_SEARCH_PATHS = (
522 | "$(inherited)",
523 | "@executable_path/Frameworks",
524 | );
525 | MARKETING_VERSION = 1.0;
526 | OTHER_LDFLAGS = (
527 | "$(inherited)",
528 | "-ObjC",
529 | "-lc++",
530 | );
531 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
532 | PRODUCT_NAME = ReactNativeWasmBridgeApp;
533 | SWIFT_VERSION = 5.0;
534 | VERSIONING_SYSTEM = "apple-generic";
535 | };
536 | name = Release;
537 | };
538 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
539 | isa = XCBuildConfiguration;
540 | buildSettings = {
541 | ALWAYS_SEARCH_USER_PATHS = NO;
542 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
543 | CLANG_CXX_LANGUAGE_STANDARD = "c++17";
544 | CLANG_CXX_LIBRARY = "libc++";
545 | CLANG_ENABLE_MODULES = YES;
546 | CLANG_ENABLE_OBJC_ARC = YES;
547 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
548 | CLANG_WARN_BOOL_CONVERSION = YES;
549 | CLANG_WARN_COMMA = YES;
550 | CLANG_WARN_CONSTANT_CONVERSION = YES;
551 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
552 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
553 | CLANG_WARN_EMPTY_BODY = YES;
554 | CLANG_WARN_ENUM_CONVERSION = YES;
555 | CLANG_WARN_INFINITE_RECURSION = YES;
556 | CLANG_WARN_INT_CONVERSION = YES;
557 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
558 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
559 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
560 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
561 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
562 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
563 | CLANG_WARN_STRICT_PROTOTYPES = YES;
564 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
565 | CLANG_WARN_UNREACHABLE_CODE = YES;
566 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
567 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
568 | COPY_PHASE_STRIP = NO;
569 | ENABLE_STRICT_OBJC_MSGSEND = YES;
570 | ENABLE_TESTABILITY = YES;
571 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
572 | GCC_C_LANGUAGE_STANDARD = gnu99;
573 | GCC_DYNAMIC_NO_PIC = NO;
574 | GCC_NO_COMMON_BLOCKS = YES;
575 | GCC_OPTIMIZATION_LEVEL = 0;
576 | GCC_PREPROCESSOR_DEFINITIONS = (
577 | "DEBUG=1",
578 | "$(inherited)",
579 | );
580 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
581 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
582 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
583 | GCC_WARN_UNDECLARED_SELECTOR = YES;
584 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
585 | GCC_WARN_UNUSED_FUNCTION = YES;
586 | GCC_WARN_UNUSED_VARIABLE = YES;
587 | IPHONEOS_DEPLOYMENT_TARGET = 12.4;
588 | LD_RUNPATH_SEARCH_PATHS = (
589 | /usr/lib/swift,
590 | "$(inherited)",
591 | );
592 | LIBRARY_SEARCH_PATHS = (
593 | "\"$(SDKROOT)/usr/lib/swift\"",
594 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
595 | "\"$(inherited)\"",
596 | );
597 | MTL_ENABLE_DEBUG_INFO = YES;
598 | ONLY_ACTIVE_ARCH = YES;
599 | OTHER_CPLUSPLUSFLAGS = (
600 | "$(OTHER_CFLAGS)",
601 | "-DFOLLY_NO_CONFIG",
602 | "-DFOLLY_MOBILE=1",
603 | "-DFOLLY_USE_LIBCPP=1",
604 | );
605 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
606 | SDKROOT = iphoneos;
607 | };
608 | name = Debug;
609 | };
610 | 83CBBA211A601CBA00E9B192 /* Release */ = {
611 | isa = XCBuildConfiguration;
612 | buildSettings = {
613 | ALWAYS_SEARCH_USER_PATHS = NO;
614 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
615 | CLANG_CXX_LANGUAGE_STANDARD = "c++17";
616 | CLANG_CXX_LIBRARY = "libc++";
617 | CLANG_ENABLE_MODULES = YES;
618 | CLANG_ENABLE_OBJC_ARC = YES;
619 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
620 | CLANG_WARN_BOOL_CONVERSION = YES;
621 | CLANG_WARN_COMMA = YES;
622 | CLANG_WARN_CONSTANT_CONVERSION = YES;
623 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
624 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
625 | CLANG_WARN_EMPTY_BODY = YES;
626 | CLANG_WARN_ENUM_CONVERSION = YES;
627 | CLANG_WARN_INFINITE_RECURSION = YES;
628 | CLANG_WARN_INT_CONVERSION = YES;
629 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
630 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
631 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
632 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
633 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
634 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
635 | CLANG_WARN_STRICT_PROTOTYPES = YES;
636 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
637 | CLANG_WARN_UNREACHABLE_CODE = YES;
638 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
639 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
640 | COPY_PHASE_STRIP = YES;
641 | ENABLE_NS_ASSERTIONS = NO;
642 | ENABLE_STRICT_OBJC_MSGSEND = YES;
643 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
644 | GCC_C_LANGUAGE_STANDARD = gnu99;
645 | GCC_NO_COMMON_BLOCKS = YES;
646 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
647 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
648 | GCC_WARN_UNDECLARED_SELECTOR = YES;
649 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
650 | GCC_WARN_UNUSED_FUNCTION = YES;
651 | GCC_WARN_UNUSED_VARIABLE = YES;
652 | IPHONEOS_DEPLOYMENT_TARGET = 12.4;
653 | LD_RUNPATH_SEARCH_PATHS = (
654 | /usr/lib/swift,
655 | "$(inherited)",
656 | );
657 | LIBRARY_SEARCH_PATHS = (
658 | "\"$(SDKROOT)/usr/lib/swift\"",
659 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
660 | "\"$(inherited)\"",
661 | );
662 | MTL_ENABLE_DEBUG_INFO = NO;
663 | OTHER_CPLUSPLUSFLAGS = (
664 | "$(OTHER_CFLAGS)",
665 | "-DFOLLY_NO_CONFIG",
666 | "-DFOLLY_MOBILE=1",
667 | "-DFOLLY_USE_LIBCPP=1",
668 | );
669 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
670 | SDKROOT = iphoneos;
671 | VALIDATE_PRODUCT = YES;
672 | };
673 | name = Release;
674 | };
675 | /* End XCBuildConfiguration section */
676 |
677 | /* Begin XCConfigurationList section */
678 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ReactNativeWasmBridgeAppTests" */ = {
679 | isa = XCConfigurationList;
680 | buildConfigurations = (
681 | 00E356F61AD99517003FC87E /* Debug */,
682 | 00E356F71AD99517003FC87E /* Release */,
683 | );
684 | defaultConfigurationIsVisible = 0;
685 | defaultConfigurationName = Release;
686 | };
687 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativeWasmBridgeApp" */ = {
688 | isa = XCConfigurationList;
689 | buildConfigurations = (
690 | 13B07F941A680F5B00A75B9A /* Debug */,
691 | 13B07F951A680F5B00A75B9A /* Release */,
692 | );
693 | defaultConfigurationIsVisible = 0;
694 | defaultConfigurationName = Release;
695 | };
696 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ReactNativeWasmBridgeApp" */ = {
697 | isa = XCConfigurationList;
698 | buildConfigurations = (
699 | 83CBBA201A601CBA00E9B192 /* Debug */,
700 | 83CBBA211A601CBA00E9B192 /* Release */,
701 | );
702 | defaultConfigurationIsVisible = 0;
703 | defaultConfigurationName = Release;
704 | };
705 | /* End XCConfigurationList section */
706 | };
707 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
708 | }
709 |
--------------------------------------------------------------------------------