Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3524111
D8658.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D8658.diff
View Options
diff --git a/native/android/app/src/cpp/jsiInstaller.cpp b/native/android/app/src/cpp/jsiInstaller.cpp
--- a/native/android/app/src/cpp/jsiInstaller.cpp
+++ b/native/android/app/src/cpp/jsiInstaller.cpp
@@ -8,6 +8,7 @@
#include <InternalModules/GlobalDBSingletonJNIHelper.h>
#include <NativeModules/CommConstants.h>
#include <NativeModules/CommCoreModule.h>
+#include <NativeModules/CommRustModule.h>
#include <NativeModules/CommUtilsModule.h>
#include <Notifications/BackgroundDataStorage/NotificationsCryptoModuleJNIHelper.h>
#include <PersistentStorageUtilities/MessageOperationsUtilities/MessageOperationsUtilitiesJNIHelper.h>
@@ -32,6 +33,8 @@
std::make_shared<comm::CommCoreModule>(jsCallInvoker);
std::shared_ptr<comm::CommUtilsModule> utilsNativeModule =
std::make_shared<comm::CommUtilsModule>(jsCallInvoker);
+ std::shared_ptr<comm::CommRustModule> rustNativeModule =
+ std::make_shared<comm::CommRustModule>(jsCallInvoker);
std::shared_ptr<comm::CommConstants> nativeConstants =
std::make_shared<comm::CommConstants>();
@@ -44,6 +47,10 @@
*rt,
jsi::PropNameID::forAscii(*rt, "CommUtilsModule"),
jsi::Object::createFromHostObject(*rt, utilsNativeModule));
+ rt->global().setProperty(
+ *rt,
+ jsi::PropNameID::forAscii(*rt, "CommRustModule"),
+ jsi::Object::createFromHostObject(*rt, rustNativeModule));
rt->global().setProperty(
*rt,
jsi::PropNameID::forAscii(*rt, "CommConstants"),
diff --git a/native/ios/Comm/AppDelegate.mm b/native/ios/Comm/AppDelegate.mm
--- a/native/ios/Comm/AppDelegate.mm
+++ b/native/ios/Comm/AppDelegate.mm
@@ -40,6 +40,7 @@
#import "CommConstants.h"
#import "CommCoreModule.h"
+#import "CommRustModule.h"
#import "CommUtilsModule.h"
#import "GlobalDBSingleton.h"
#import "Logger.h"
@@ -279,6 +280,8 @@
std::make_shared<comm::CommCoreModule>(bridge.jsCallInvoker);
std::shared_ptr<comm::CommUtilsModule> utilsNativeModule =
std::make_shared<comm::CommUtilsModule>(bridge.jsCallInvoker);
+ std::shared_ptr<comm::CommRustModule> rustNativeModule =
+ std::make_shared<comm::CommRustModule>(bridge.jsCallInvoker);
std::shared_ptr<comm::CommConstants> nativeConstants =
std::make_shared<comm::CommConstants>();
@@ -290,6 +293,10 @@
rt,
facebook::jsi::PropNameID::forAscii(rt, "CommUtilsModule"),
facebook::jsi::Object::createFromHostObject(rt, utilsNativeModule));
+ rt.global().setProperty(
+ rt,
+ facebook::jsi::PropNameID::forAscii(rt, "CommRustModule"),
+ facebook::jsi::Object::createFromHostObject(rt, rustNativeModule));
rt.global().setProperty(
rt,
facebook::jsi::PropNameID::forAscii(rt, "CommConstants"),
diff --git a/native/native-modules.js b/native/native-modules.js
--- a/native/native-modules.js
+++ b/native/native-modules.js
@@ -1,10 +1,12 @@
// @flow
import type { Spec as CoreModuleSpec } from './schema/CommCoreModuleSchema.js';
+import type { Spec as RustModuleSpec } from './schema/CommRustModuleSchema.js';
import type { UtilsModuleSpec } from './schema/CommUtilsModuleSchema.js';
export const commCoreModule: CoreModuleSpec = global.CommCoreModule;
export const commUtilsModule: UtilsModuleSpec = global.CommUtilsModule;
+export const commRustModule: RustModuleSpec = global.CommRustModule;
export const commConstants: {
+NATIVE_MESSAGE_TYPES: $ReadOnlyArray<number>,
} = global.CommConstants;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 11:25 AM (5 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2698157
Default Alt Text
D8658.diff (3 KB)
Attached To
Mode
D8658: [native] install CommRustModule
Attached
Detach File
Event Timeline
Log In to Comment