@rusaint/react-native 0.10.0-dev.4 → 0.10.0-dev.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/gradle.properties +5 -5
- package/build/RusaintReactNative.xcframework/Info.plist +4 -4
- package/build/RusaintReactNative.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/build/RusaintReactNative.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
- package/build/RusaintReactNative.xcframework/_CodeSignature/CodeSignature +0 -0
- package/lib/commonjs/NativeRusaintReactNative.js +10 -0
- package/lib/commonjs/NativeRusaintReactNative.js.map +1 -0
- package/lib/commonjs/index.js +1 -1
- package/lib/module/NativeRusaintReactNative.js +7 -0
- package/lib/module/NativeRusaintReactNative.js.map +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/package.json +12 -8
- package/android/generated/java/com/facebook/fbreact/specs/NativeRusaintReactNativeSpec.java +0 -41
- package/android/generated/jni/CMakeLists.txt +0 -36
- package/android/generated/jni/RNRusaintSpec-generated.cpp +0 -38
- package/android/generated/jni/RNRusaintSpec.h +0 -31
- package/android/generated/jni/react/renderer/components/RNRusaintSpec/RNRusaintSpecJSI-generated.cpp +0 -32
- package/android/generated/jni/react/renderer/components/RNRusaintSpec/RNRusaintSpecJSI.h +0 -80
- package/ios/generated/RCTAppDependencyProvider.h +0 -25
- package/ios/generated/RCTAppDependencyProvider.mm +0 -35
- package/ios/generated/RCTModuleProviders.h +0 -16
- package/ios/generated/RCTModuleProviders.mm +0 -51
- package/ios/generated/RCTModulesConformingToProtocolsProvider.h +0 -18
- package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +0 -54
- package/ios/generated/RCTThirdPartyComponentsProvider.h +0 -16
- package/ios/generated/RCTThirdPartyComponentsProvider.mm +0 -30
- package/ios/generated/RNRusaintSpec/RNRusaintSpec-generated.mm +0 -46
- package/ios/generated/RNRusaintSpec/RNRusaintSpec.h +0 -63
- package/ios/generated/RNRusaintSpecJSI-generated.cpp +0 -32
- package/ios/generated/RNRusaintSpecJSI.h +0 -80
- package/ios/generated/ReactAppDependencyProvider.podspec +0 -34
- package/lib/commonjs/NativeRusaintReactNative.ts +0 -10
- package/lib/module/NativeRusaintReactNative.ts +0 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
RusaintReactNative_kotlinVersion=2.0.21
|
|
2
|
+
RusaintReactNative_minSdkVersion=24
|
|
3
|
+
RusaintReactNative_targetSdkVersion=34
|
|
4
|
+
RusaintReactNative_compileSdkVersion=35
|
|
5
|
+
RusaintReactNative_ndkVersion=27.1.12297006
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
9
|
<string>librusaint_ffi.a</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-arm64
|
|
11
|
+
<string>ios-arm64</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>librusaint_ffi.a</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
@@ -17,14 +17,12 @@
|
|
|
17
17
|
</array>
|
|
18
18
|
<key>SupportedPlatform</key>
|
|
19
19
|
<string>ios</string>
|
|
20
|
-
<key>SupportedPlatformVariant</key>
|
|
21
|
-
<string>simulator</string>
|
|
22
20
|
</dict>
|
|
23
21
|
<dict>
|
|
24
22
|
<key>BinaryPath</key>
|
|
25
23
|
<string>librusaint_ffi.a</string>
|
|
26
24
|
<key>LibraryIdentifier</key>
|
|
27
|
-
<string>ios-arm64</string>
|
|
25
|
+
<string>ios-arm64-simulator</string>
|
|
28
26
|
<key>LibraryPath</key>
|
|
29
27
|
<string>librusaint_ffi.a</string>
|
|
30
28
|
<key>SupportedArchitectures</key>
|
|
@@ -33,6 +31,8 @@
|
|
|
33
31
|
</array>
|
|
34
32
|
<key>SupportedPlatform</key>
|
|
35
33
|
<string>ios</string>
|
|
34
|
+
<key>SupportedPlatformVariant</key>
|
|
35
|
+
<string>simulator</string>
|
|
36
36
|
</dict>
|
|
37
37
|
</array>
|
|
38
38
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
// Generated by uniffi-bindgen-react-native
|
|
9
|
+
var _default = exports.default = _reactNative.TurboModuleRegistry.getEnforcing('RusaintReactNative');
|
|
10
|
+
//# sourceMappingURL=NativeRusaintReactNative.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeRusaintReactNative.ts"],"mappings":";;;;;;AAEA,IAAAA,YAAA,GAAAC,OAAA;AAFA;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GASeC,gCAAmB,CAACC,YAAY,CAAO,oBAAoB,CAAC","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {};
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _NativeRusaintReactNative = _interopRequireDefault(require("./NativeRusaintReactNative"));
|
|
8
|
+
var _NativeRusaintReactNative = _interopRequireDefault(require("./NativeRusaintReactNative.js"));
|
|
9
9
|
var rusaint = _interopRequireWildcard(require("./generated/rusaint.js"));
|
|
10
10
|
Object.keys(rusaint).forEach(function (key) {
|
|
11
11
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeRusaintReactNative.ts"],"mappings":";;AAAA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;AAOlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,oBAAoB,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
// Generated by uniffi-bindgen-react-native
|
|
4
|
-
import installer from
|
|
4
|
+
import installer from "./NativeRusaintReactNative.js";
|
|
5
5
|
|
|
6
6
|
// Register the rust crate with Hermes
|
|
7
7
|
// - the boolean flag ensures this loads exactly once, even if the JS
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["installer","rustInstalled","installRustCrate","rusaint","rusaint_ffi","initialized","default","initialize"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA;AACA,OAAOA,SAAS,MAAM
|
|
1
|
+
{"version":3,"names":["installer","rustInstalled","installRustCrate","rusaint","rusaint_ffi","initialized","default","initialize"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA;AACA,OAAOA,SAAS,MAAM,+BAA4B;;AAElD;AACA;AACA;AACA,IAAIC,aAAa,GAAG,KAAK;AACzB,IAAI,CAACA,aAAa,EAAE;EAClBD,SAAS,CAACE,gBAAgB,CAAC,CAAC;EAC5BD,aAAa,GAAG,IAAI;AACtB;;AAEA;AACA,cAAc,wBAAqB;AACnC,cAAc,4BAAyB;;AAEvC;AACA;AACA;AACA,OAAO,KAAKE,OAAO,MAAM,wBAAqB;AAC9C,OAAO,KAAKC,WAAW,MAAM,4BAAyB;;AAEtD;AACA;AACA;AACA,IAAIC,WAAW,GAAG,KAAK;AACvB,IAAI,CAACA,WAAW,EAAE;EAChBF,OAAO,CAACG,OAAO,CAACC,UAAU,CAAC,CAAC;EAC5BH,WAAW,CAACE,OAAO,CAACC,UAAU,CAAC,CAAC;EAChCF,WAAW,GAAG,IAAI;AACpB;;AAEA;AACA,eAAe;EACbF,OAAO;EACPC;AACF,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rusaint/react-native",
|
|
3
|
-
"version": "0.10.0-dev.
|
|
3
|
+
"version": "0.10.0-dev.6",
|
|
4
4
|
"description": "React native implementation of the rusaint, scraper library for SSU u-saint",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
16
16
|
"default": "./lib/commonjs/index.js"
|
|
17
17
|
}
|
|
18
|
-
}
|
|
18
|
+
},
|
|
19
|
+
"./package.json": "./package.json"
|
|
19
20
|
},
|
|
20
21
|
"files": [
|
|
21
22
|
"src",
|
|
@@ -88,7 +89,7 @@
|
|
|
88
89
|
"prettier": "^3.5.3",
|
|
89
90
|
"react": "19.1.0",
|
|
90
91
|
"react-native": "0.79.2",
|
|
91
|
-
"react-native-builder-bob": "^0.
|
|
92
|
+
"react-native-builder-bob": "^0.40.0",
|
|
92
93
|
"release-it": "^18.1.2",
|
|
93
94
|
"turbo": "^2.4.4",
|
|
94
95
|
"typescript": "^5.6.3",
|
|
@@ -143,15 +144,14 @@
|
|
|
143
144
|
"source": "src",
|
|
144
145
|
"output": "lib",
|
|
145
146
|
"targets": [
|
|
146
|
-
"codegen",
|
|
147
147
|
[
|
|
148
|
-
"
|
|
148
|
+
"module",
|
|
149
149
|
{
|
|
150
150
|
"esm": true
|
|
151
151
|
}
|
|
152
152
|
],
|
|
153
153
|
[
|
|
154
|
-
"
|
|
154
|
+
"commonjs",
|
|
155
155
|
{
|
|
156
156
|
"esm": true
|
|
157
157
|
}
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
},
|
|
167
167
|
"codegenConfig": {
|
|
168
168
|
"name": "RNRusaintSpec",
|
|
169
|
-
"type": "
|
|
169
|
+
"type": "all",
|
|
170
170
|
"jsSrcsDir": "src",
|
|
171
171
|
"outputDir": {
|
|
172
172
|
"ios": "ios/generated",
|
|
@@ -181,5 +181,9 @@
|
|
|
181
181
|
"type": "turbo-module",
|
|
182
182
|
"languages": "cpp",
|
|
183
183
|
"version": "0.48.6"
|
|
184
|
-
}
|
|
184
|
+
},
|
|
185
|
+
"eslintIgnore": [
|
|
186
|
+
"node_modules/",
|
|
187
|
+
"lib/"
|
|
188
|
+
]
|
|
185
189
|
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateModuleJavaSpec.js
|
|
9
|
-
*
|
|
10
|
-
* @nolint
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
package com.facebook.fbreact.specs;
|
|
14
|
-
|
|
15
|
-
import com.facebook.proguard.annotations.DoNotStrip;
|
|
16
|
-
import com.facebook.react.bridge.ReactApplicationContext;
|
|
17
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
18
|
-
import com.facebook.react.bridge.ReactMethod;
|
|
19
|
-
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
|
|
20
|
-
import javax.annotation.Nonnull;
|
|
21
|
-
|
|
22
|
-
public abstract class NativeRusaintReactNativeSpec extends ReactContextBaseJavaModule implements TurboModule {
|
|
23
|
-
public static final String NAME = "RusaintReactNative";
|
|
24
|
-
|
|
25
|
-
public NativeRusaintReactNativeSpec(ReactApplicationContext reactContext) {
|
|
26
|
-
super(reactContext);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@Override
|
|
30
|
-
public @Nonnull String getName() {
|
|
31
|
-
return NAME;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@ReactMethod(isBlockingSynchronousMethod = true)
|
|
35
|
-
@DoNotStrip
|
|
36
|
-
public abstract boolean installRustCrate();
|
|
37
|
-
|
|
38
|
-
@ReactMethod(isBlockingSynchronousMethod = true)
|
|
39
|
-
@DoNotStrip
|
|
40
|
-
public abstract boolean cleanupRustCrate();
|
|
41
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
#
|
|
3
|
-
# This source code is licensed under the MIT license found in the
|
|
4
|
-
# LICENSE file in the root directory of this source tree.
|
|
5
|
-
|
|
6
|
-
cmake_minimum_required(VERSION 3.13)
|
|
7
|
-
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
8
|
-
|
|
9
|
-
file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNRusaintSpec/*.cpp)
|
|
10
|
-
|
|
11
|
-
add_library(
|
|
12
|
-
react_codegen_RNRusaintSpec
|
|
13
|
-
OBJECT
|
|
14
|
-
${react_codegen_SRCS}
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
target_include_directories(react_codegen_RNRusaintSpec PUBLIC . react/renderer/components/RNRusaintSpec)
|
|
18
|
-
|
|
19
|
-
target_link_libraries(
|
|
20
|
-
react_codegen_RNRusaintSpec
|
|
21
|
-
fbjni
|
|
22
|
-
jsi
|
|
23
|
-
# We need to link different libraries based on whether we are building rncore or not, that's necessary
|
|
24
|
-
# because we want to break a circular dependency between react_codegen_rncore and reactnative
|
|
25
|
-
reactnative
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
target_compile_options(
|
|
29
|
-
react_codegen_RNRusaintSpec
|
|
30
|
-
PRIVATE
|
|
31
|
-
-DLOG_TAG=\"ReactNative\"
|
|
32
|
-
-fexceptions
|
|
33
|
-
-frtti
|
|
34
|
-
-std=c++20
|
|
35
|
-
-Wall
|
|
36
|
-
)
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateModuleJniCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "RNRusaintSpec.h"
|
|
12
|
-
|
|
13
|
-
namespace facebook::react {
|
|
14
|
-
|
|
15
|
-
static facebook::jsi::Value __hostFunction_NativeRusaintReactNativeSpecJSI_installRustCrate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
16
|
-
static jmethodID cachedMethodId = nullptr;
|
|
17
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, BooleanKind, "installRustCrate", "()Z", args, count, cachedMethodId);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
static facebook::jsi::Value __hostFunction_NativeRusaintReactNativeSpecJSI_cleanupRustCrate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
21
|
-
static jmethodID cachedMethodId = nullptr;
|
|
22
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, BooleanKind, "cleanupRustCrate", "()Z", args, count, cachedMethodId);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
NativeRusaintReactNativeSpecJSI::NativeRusaintReactNativeSpecJSI(const JavaTurboModule::InitParams ¶ms)
|
|
26
|
-
: JavaTurboModule(params) {
|
|
27
|
-
methodMap_["installRustCrate"] = MethodMetadata {0, __hostFunction_NativeRusaintReactNativeSpecJSI_installRustCrate};
|
|
28
|
-
methodMap_["cleanupRustCrate"] = MethodMetadata {0, __hostFunction_NativeRusaintReactNativeSpecJSI_cleanupRustCrate};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
std::shared_ptr<TurboModule> RNRusaintSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) {
|
|
32
|
-
if (moduleName == "RusaintReactNative") {
|
|
33
|
-
return std::make_shared<NativeRusaintReactNativeSpecJSI>(params);
|
|
34
|
-
}
|
|
35
|
-
return nullptr;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
} // namespace facebook::react
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateModuleJniH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include <ReactCommon/JavaTurboModule.h>
|
|
14
|
-
#include <ReactCommon/TurboModule.h>
|
|
15
|
-
#include <jsi/jsi.h>
|
|
16
|
-
|
|
17
|
-
namespace facebook::react {
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* JNI C++ class for module 'NativeRusaintReactNative'
|
|
21
|
-
*/
|
|
22
|
-
class JSI_EXPORT NativeRusaintReactNativeSpecJSI : public JavaTurboModule {
|
|
23
|
-
public:
|
|
24
|
-
NativeRusaintReactNativeSpecJSI(const JavaTurboModule::InitParams ¶ms);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
JSI_EXPORT
|
|
29
|
-
std::shared_ptr<TurboModule> RNRusaintSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms);
|
|
30
|
-
|
|
31
|
-
} // namespace facebook::react
|
package/android/generated/jni/react/renderer/components/RNRusaintSpec/RNRusaintSpecJSI-generated.cpp
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleCpp.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#include "RNRusaintSpecJSI.h"
|
|
11
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
|
|
14
|
-
static jsi::Value __hostFunction_NativeRusaintReactNativeCxxSpecJSI_installRustCrate(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
15
|
-
return static_cast<NativeRusaintReactNativeCxxSpecJSI *>(&turboModule)->installRustCrate(
|
|
16
|
-
rt
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
static jsi::Value __hostFunction_NativeRusaintReactNativeCxxSpecJSI_cleanupRustCrate(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
20
|
-
return static_cast<NativeRusaintReactNativeCxxSpecJSI *>(&turboModule)->cleanupRustCrate(
|
|
21
|
-
rt
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
NativeRusaintReactNativeCxxSpecJSI::NativeRusaintReactNativeCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
26
|
-
: TurboModule("RusaintReactNative", jsInvoker) {
|
|
27
|
-
methodMap_["installRustCrate"] = MethodMetadata {0, __hostFunction_NativeRusaintReactNativeCxxSpecJSI_installRustCrate};
|
|
28
|
-
methodMap_["cleanupRustCrate"] = MethodMetadata {0, __hostFunction_NativeRusaintReactNativeCxxSpecJSI_cleanupRustCrate};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} // namespace facebook::react
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleH.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <ReactCommon/TurboModule.h>
|
|
13
|
-
#include <react/bridging/Bridging.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class JSI_EXPORT NativeRusaintReactNativeCxxSpecJSI : public TurboModule {
|
|
19
|
-
protected:
|
|
20
|
-
NativeRusaintReactNativeCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
21
|
-
|
|
22
|
-
public:
|
|
23
|
-
virtual bool installRustCrate(jsi::Runtime &rt) = 0;
|
|
24
|
-
virtual bool cleanupRustCrate(jsi::Runtime &rt) = 0;
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
template <typename T>
|
|
29
|
-
class JSI_EXPORT NativeRusaintReactNativeCxxSpec : public TurboModule {
|
|
30
|
-
public:
|
|
31
|
-
jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
32
|
-
return delegate_.create(rt, propName);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
|
|
36
|
-
return delegate_.getPropertyNames(runtime);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
static constexpr std::string_view kModuleName = "RusaintReactNative";
|
|
40
|
-
|
|
41
|
-
protected:
|
|
42
|
-
NativeRusaintReactNativeCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
43
|
-
: TurboModule(std::string{NativeRusaintReactNativeCxxSpec::kModuleName}, jsInvoker),
|
|
44
|
-
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
private:
|
|
48
|
-
class Delegate : public NativeRusaintReactNativeCxxSpecJSI {
|
|
49
|
-
public:
|
|
50
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
51
|
-
NativeRusaintReactNativeCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
bool installRustCrate(jsi::Runtime &rt) override {
|
|
56
|
-
static_assert(
|
|
57
|
-
bridging::getParameterCount(&T::installRustCrate) == 1,
|
|
58
|
-
"Expected installRustCrate(...) to have 1 parameters");
|
|
59
|
-
|
|
60
|
-
return bridging::callFromJs<bool>(
|
|
61
|
-
rt, &T::installRustCrate, jsInvoker_, instance_);
|
|
62
|
-
}
|
|
63
|
-
bool cleanupRustCrate(jsi::Runtime &rt) override {
|
|
64
|
-
static_assert(
|
|
65
|
-
bridging::getParameterCount(&T::cleanupRustCrate) == 1,
|
|
66
|
-
"Expected cleanupRustCrate(...) to have 1 parameters");
|
|
67
|
-
|
|
68
|
-
return bridging::callFromJs<bool>(
|
|
69
|
-
rt, &T::cleanupRustCrate, jsInvoker_, instance_);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
private:
|
|
73
|
-
friend class NativeRusaintReactNativeCxxSpec;
|
|
74
|
-
T *instance_;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
Delegate delegate_;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
} // namespace facebook::react
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
#import <Foundation/Foundation.h>
|
|
10
|
-
|
|
11
|
-
#if __has_include(<React-RCTAppDelegate/RCTDependencyProvider.h>)
|
|
12
|
-
#import <React-RCTAppDelegate/RCTDependencyProvider.h>
|
|
13
|
-
#elif __has_include(<React_RCTAppDelegate/RCTDependencyProvider.h>)
|
|
14
|
-
#import <React_RCTAppDelegate/RCTDependencyProvider.h>
|
|
15
|
-
#else
|
|
16
|
-
#import "RCTDependencyProvider.h"
|
|
17
|
-
#endif
|
|
18
|
-
|
|
19
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
20
|
-
|
|
21
|
-
@interface RCTAppDependencyProvider : NSObject <RCTDependencyProvider>
|
|
22
|
-
|
|
23
|
-
@end
|
|
24
|
-
|
|
25
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import "RCTAppDependencyProvider.h"
|
|
9
|
-
#import <ReactCodegen/RCTModulesConformingToProtocolsProvider.h>
|
|
10
|
-
#import <ReactCodegen/RCTThirdPartyComponentsProvider.h>
|
|
11
|
-
#import <ReactCodegen/RCTModuleProviders.h>
|
|
12
|
-
|
|
13
|
-
@implementation RCTAppDependencyProvider
|
|
14
|
-
|
|
15
|
-
- (nonnull NSArray<NSString *> *)URLRequestHandlerClassNames {
|
|
16
|
-
return RCTModulesConformingToProtocolsProvider.URLRequestHandlerClassNames;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
- (nonnull NSArray<NSString *> *)imageDataDecoderClassNames {
|
|
20
|
-
return RCTModulesConformingToProtocolsProvider.imageDataDecoderClassNames;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
- (nonnull NSArray<NSString *> *)imageURLLoaderClassNames {
|
|
24
|
-
return RCTModulesConformingToProtocolsProvider.imageURLLoaderClassNames;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
- (nonnull NSDictionary<NSString *,Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents {
|
|
28
|
-
return RCTThirdPartyComponentsProvider.thirdPartyFabricComponents;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
- (nonnull NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders {
|
|
32
|
-
return RCTModuleProviders.moduleProviders;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@end
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
|
|
10
|
-
@protocol RCTModuleProvider;
|
|
11
|
-
|
|
12
|
-
@interface RCTModuleProviders: NSObject
|
|
13
|
-
|
|
14
|
-
+ (NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders;
|
|
15
|
-
|
|
16
|
-
@end
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
|
|
10
|
-
#import "RCTModuleProviders.h"
|
|
11
|
-
#import <ReactCommon/RCTTurboModule.h>
|
|
12
|
-
#import <React/RCTLog.h>
|
|
13
|
-
|
|
14
|
-
@implementation RCTModuleProviders
|
|
15
|
-
|
|
16
|
-
+ (NSDictionary<NSString *, id<RCTModuleProvider>> *)moduleProviders
|
|
17
|
-
{
|
|
18
|
-
static NSDictionary<NSString *, id<RCTModuleProvider>> *providers = nil;
|
|
19
|
-
static dispatch_once_t onceToken;
|
|
20
|
-
|
|
21
|
-
dispatch_once(&onceToken, ^{
|
|
22
|
-
NSDictionary<NSString *, NSString *> * moduleMapping = @{
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithCapacity:moduleMapping.count];
|
|
27
|
-
|
|
28
|
-
for (NSString *key in moduleMapping) {
|
|
29
|
-
NSString * moduleProviderName = moduleMapping[key];
|
|
30
|
-
Class klass = NSClassFromString(moduleProviderName);
|
|
31
|
-
if (!klass) {
|
|
32
|
-
RCTLogError(@"Module provider %@ cannot be found in the runtime", moduleProviderName);
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
id instance = [klass new];
|
|
37
|
-
if (![instance respondsToSelector:@selector(getTurboModule:)]) {
|
|
38
|
-
RCTLogError(@"Module provider %@ does not conform to RCTModuleProvider", moduleProviderName);
|
|
39
|
-
continue;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
[dict setObject:instance forKey:key];
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
providers = dict;
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
return providers;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
|
|
10
|
-
@interface RCTModulesConformingToProtocolsProvider: NSObject
|
|
11
|
-
|
|
12
|
-
+(NSArray<NSString *> *)imageURLLoaderClassNames;
|
|
13
|
-
|
|
14
|
-
+(NSArray<NSString *> *)imageDataDecoderClassNames;
|
|
15
|
-
|
|
16
|
-
+(NSArray<NSString *> *)URLRequestHandlerClassNames;
|
|
17
|
-
|
|
18
|
-
@end
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import "RCTModulesConformingToProtocolsProvider.h"
|
|
9
|
-
|
|
10
|
-
@implementation RCTModulesConformingToProtocolsProvider
|
|
11
|
-
|
|
12
|
-
+(NSArray<NSString *> *)imageURLLoaderClassNames
|
|
13
|
-
{
|
|
14
|
-
static NSArray<NSString *> *classNames = nil;
|
|
15
|
-
static dispatch_once_t onceToken;
|
|
16
|
-
|
|
17
|
-
dispatch_once(&onceToken, ^{
|
|
18
|
-
classNames = @[
|
|
19
|
-
|
|
20
|
-
];
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
return classNames;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
+(NSArray<NSString *> *)imageDataDecoderClassNames
|
|
27
|
-
{
|
|
28
|
-
static NSArray<NSString *> *classNames = nil;
|
|
29
|
-
static dispatch_once_t onceToken;
|
|
30
|
-
|
|
31
|
-
dispatch_once(&onceToken, ^{
|
|
32
|
-
classNames = @[
|
|
33
|
-
|
|
34
|
-
];
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
return classNames;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
+(NSArray<NSString *> *)URLRequestHandlerClassNames
|
|
41
|
-
{
|
|
42
|
-
static NSArray<NSString *> *classNames = nil;
|
|
43
|
-
static dispatch_once_t onceToken;
|
|
44
|
-
|
|
45
|
-
dispatch_once(&onceToken, ^{
|
|
46
|
-
classNames = @[
|
|
47
|
-
|
|
48
|
-
];
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
return classNames;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
@end
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
|
|
10
|
-
@protocol RCTComponentViewProtocol;
|
|
11
|
-
|
|
12
|
-
@interface RCTThirdPartyComponentsProvider: NSObject
|
|
13
|
-
|
|
14
|
-
+ (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents;
|
|
15
|
-
|
|
16
|
-
@end
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
#import <Foundation/Foundation.h>
|
|
10
|
-
|
|
11
|
-
#import "RCTThirdPartyComponentsProvider.h"
|
|
12
|
-
#import <React/RCTComponentViewProtocol.h>
|
|
13
|
-
|
|
14
|
-
@implementation RCTThirdPartyComponentsProvider
|
|
15
|
-
|
|
16
|
-
+ (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
|
|
17
|
-
{
|
|
18
|
-
static NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *thirdPartyComponents = nil;
|
|
19
|
-
static dispatch_once_t nativeComponentsToken;
|
|
20
|
-
|
|
21
|
-
dispatch_once(&nativeComponentsToken, ^{
|
|
22
|
-
thirdPartyComponents = @{
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
return thirdPartyComponents;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@end
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleObjCpp
|
|
8
|
-
*
|
|
9
|
-
* We create an umbrella header (and corresponding implementation) here since
|
|
10
|
-
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
|
|
11
|
-
* must have a single output. More files => more genrule()s => slower builds.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
#import "RNRusaintSpec.h"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@implementation NativeRusaintReactNativeSpecBase
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
|
|
21
|
-
{
|
|
22
|
-
_eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
|
|
23
|
-
}
|
|
24
|
-
@end
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
namespace facebook::react {
|
|
28
|
-
|
|
29
|
-
static facebook::jsi::Value __hostFunction_NativeRusaintReactNativeSpecJSI_installRustCrate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
30
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, BooleanKind, "installRustCrate", @selector(installRustCrate), args, count);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
static facebook::jsi::Value __hostFunction_NativeRusaintReactNativeSpecJSI_cleanupRustCrate(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
34
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, BooleanKind, "cleanupRustCrate", @selector(cleanupRustCrate), args, count);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
NativeRusaintReactNativeSpecJSI::NativeRusaintReactNativeSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
|
38
|
-
: ObjCTurboModule(params) {
|
|
39
|
-
|
|
40
|
-
methodMap_["installRustCrate"] = MethodMetadata {0, __hostFunction_NativeRusaintReactNativeSpecJSI_installRustCrate};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
methodMap_["cleanupRustCrate"] = MethodMetadata {0, __hostFunction_NativeRusaintReactNativeSpecJSI_cleanupRustCrate};
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
} // namespace facebook::react
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleObjCpp
|
|
8
|
-
*
|
|
9
|
-
* We create an umbrella header (and corresponding implementation) here since
|
|
10
|
-
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
|
|
11
|
-
* must have a single output. More files => more genrule()s => slower builds.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
#ifndef __cplusplus
|
|
15
|
-
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
|
|
16
|
-
#endif
|
|
17
|
-
|
|
18
|
-
// Avoid multiple includes of RNRusaintSpec symbols
|
|
19
|
-
#ifndef RNRusaintSpec_H
|
|
20
|
-
#define RNRusaintSpec_H
|
|
21
|
-
|
|
22
|
-
#import <Foundation/Foundation.h>
|
|
23
|
-
#import <RCTRequired/RCTRequired.h>
|
|
24
|
-
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
|
25
|
-
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
|
|
26
|
-
#import <React/RCTBridgeModule.h>
|
|
27
|
-
#import <React/RCTCxxConvert.h>
|
|
28
|
-
#import <React/RCTManagedPointer.h>
|
|
29
|
-
#import <ReactCommon/RCTTurboModule.h>
|
|
30
|
-
#import <optional>
|
|
31
|
-
#import <vector>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
35
|
-
|
|
36
|
-
@protocol NativeRusaintReactNativeSpec <RCTBridgeModule, RCTTurboModule>
|
|
37
|
-
|
|
38
|
-
- (NSNumber *)installRustCrate;
|
|
39
|
-
- (NSNumber *)cleanupRustCrate;
|
|
40
|
-
|
|
41
|
-
@end
|
|
42
|
-
|
|
43
|
-
@interface NativeRusaintReactNativeSpecBase : NSObject {
|
|
44
|
-
@protected
|
|
45
|
-
facebook::react::EventEmitterCallback _eventEmitterCallback;
|
|
46
|
-
}
|
|
47
|
-
- (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
@end
|
|
51
|
-
|
|
52
|
-
namespace facebook::react {
|
|
53
|
-
/**
|
|
54
|
-
* ObjC++ class for module 'NativeRusaintReactNative'
|
|
55
|
-
*/
|
|
56
|
-
class JSI_EXPORT NativeRusaintReactNativeSpecJSI : public ObjCTurboModule {
|
|
57
|
-
public:
|
|
58
|
-
NativeRusaintReactNativeSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
|
59
|
-
};
|
|
60
|
-
} // namespace facebook::react
|
|
61
|
-
|
|
62
|
-
NS_ASSUME_NONNULL_END
|
|
63
|
-
#endif // RNRusaintSpec_H
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleCpp.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#include "RNRusaintSpecJSI.h"
|
|
11
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
|
|
14
|
-
static jsi::Value __hostFunction_NativeRusaintReactNativeCxxSpecJSI_installRustCrate(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
15
|
-
return static_cast<NativeRusaintReactNativeCxxSpecJSI *>(&turboModule)->installRustCrate(
|
|
16
|
-
rt
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
static jsi::Value __hostFunction_NativeRusaintReactNativeCxxSpecJSI_cleanupRustCrate(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
20
|
-
return static_cast<NativeRusaintReactNativeCxxSpecJSI *>(&turboModule)->cleanupRustCrate(
|
|
21
|
-
rt
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
NativeRusaintReactNativeCxxSpecJSI::NativeRusaintReactNativeCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
26
|
-
: TurboModule("RusaintReactNative", jsInvoker) {
|
|
27
|
-
methodMap_["installRustCrate"] = MethodMetadata {0, __hostFunction_NativeRusaintReactNativeCxxSpecJSI_installRustCrate};
|
|
28
|
-
methodMap_["cleanupRustCrate"] = MethodMetadata {0, __hostFunction_NativeRusaintReactNativeCxxSpecJSI_cleanupRustCrate};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} // namespace facebook::react
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleH.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <ReactCommon/TurboModule.h>
|
|
13
|
-
#include <react/bridging/Bridging.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class JSI_EXPORT NativeRusaintReactNativeCxxSpecJSI : public TurboModule {
|
|
19
|
-
protected:
|
|
20
|
-
NativeRusaintReactNativeCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
21
|
-
|
|
22
|
-
public:
|
|
23
|
-
virtual bool installRustCrate(jsi::Runtime &rt) = 0;
|
|
24
|
-
virtual bool cleanupRustCrate(jsi::Runtime &rt) = 0;
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
template <typename T>
|
|
29
|
-
class JSI_EXPORT NativeRusaintReactNativeCxxSpec : public TurboModule {
|
|
30
|
-
public:
|
|
31
|
-
jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
32
|
-
return delegate_.create(rt, propName);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
|
|
36
|
-
return delegate_.getPropertyNames(runtime);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
static constexpr std::string_view kModuleName = "RusaintReactNative";
|
|
40
|
-
|
|
41
|
-
protected:
|
|
42
|
-
NativeRusaintReactNativeCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
43
|
-
: TurboModule(std::string{NativeRusaintReactNativeCxxSpec::kModuleName}, jsInvoker),
|
|
44
|
-
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
private:
|
|
48
|
-
class Delegate : public NativeRusaintReactNativeCxxSpecJSI {
|
|
49
|
-
public:
|
|
50
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
51
|
-
NativeRusaintReactNativeCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
bool installRustCrate(jsi::Runtime &rt) override {
|
|
56
|
-
static_assert(
|
|
57
|
-
bridging::getParameterCount(&T::installRustCrate) == 1,
|
|
58
|
-
"Expected installRustCrate(...) to have 1 parameters");
|
|
59
|
-
|
|
60
|
-
return bridging::callFromJs<bool>(
|
|
61
|
-
rt, &T::installRustCrate, jsInvoker_, instance_);
|
|
62
|
-
}
|
|
63
|
-
bool cleanupRustCrate(jsi::Runtime &rt) override {
|
|
64
|
-
static_assert(
|
|
65
|
-
bridging::getParameterCount(&T::cleanupRustCrate) == 1,
|
|
66
|
-
"Expected cleanupRustCrate(...) to have 1 parameters");
|
|
67
|
-
|
|
68
|
-
return bridging::callFromJs<bool>(
|
|
69
|
-
rt, &T::cleanupRustCrate, jsInvoker_, instance_);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
private:
|
|
73
|
-
friend class NativeRusaintReactNativeCxxSpec;
|
|
74
|
-
T *instance_;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
Delegate delegate_;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
} // namespace facebook::react
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
#
|
|
3
|
-
# This source code is licensed under the MIT license found in the
|
|
4
|
-
# LICENSE file in the root directory of this source tree.
|
|
5
|
-
|
|
6
|
-
version = "0.79.2"
|
|
7
|
-
source = { :git => 'https://github.com/facebook/react-native.git' }
|
|
8
|
-
if version == '1000.0.0'
|
|
9
|
-
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
|
10
|
-
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
|
11
|
-
else
|
|
12
|
-
source[:tag] = "v#{version}"
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
Pod::Spec.new do |s|
|
|
16
|
-
s.name = "ReactAppDependencyProvider"
|
|
17
|
-
s.version = version
|
|
18
|
-
s.summary = "The third party dependency provider for the app"
|
|
19
|
-
s.homepage = "https://reactnative.dev/"
|
|
20
|
-
s.documentation_url = "https://reactnative.dev/"
|
|
21
|
-
s.license = "MIT"
|
|
22
|
-
s.author = "Meta Platforms, Inc. and its affiliates"
|
|
23
|
-
s.platforms = min_supported_versions
|
|
24
|
-
s.source = source
|
|
25
|
-
s.source_files = "**/RCTAppDependencyProvider.{h,mm}"
|
|
26
|
-
|
|
27
|
-
# This guard prevent to install the dependencies when we run `pod install` in the old architecture.
|
|
28
|
-
s.pod_target_xcconfig = {
|
|
29
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
|
30
|
-
"DEFINES_MODULE" => "YES"
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
s.dependency "ReactCodegen"
|
|
34
|
-
end
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// Generated by uniffi-bindgen-react-native
|
|
2
|
-
import type { TurboModule } from 'react-native';
|
|
3
|
-
import { TurboModuleRegistry } from 'react-native';
|
|
4
|
-
|
|
5
|
-
export interface Spec extends TurboModule {
|
|
6
|
-
installRustCrate(): boolean;
|
|
7
|
-
cleanupRustCrate(): boolean;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default TurboModuleRegistry.getEnforcing<Spec>('RusaintReactNative');
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// Generated by uniffi-bindgen-react-native
|
|
2
|
-
import type { TurboModule } from 'react-native';
|
|
3
|
-
import { TurboModuleRegistry } from 'react-native';
|
|
4
|
-
|
|
5
|
-
export interface Spec extends TurboModule {
|
|
6
|
-
installRustCrate(): boolean;
|
|
7
|
-
cleanupRustCrate(): boolean;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default TurboModuleRegistry.getEnforcing<Spec>('RusaintReactNative');
|