diff --git a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp --- a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp +++ b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp @@ -4,9 +4,11 @@ #include "DatabaseManager.h" #include "DraftStoreOperations.h" #include "InternalModules/GlobalDBSingleton.h" +#include "InternalModules/RustPromiseManager.h" #include "MessageStoreOperations.h" #include "TerminateApp.h" #include "ThreadStoreOperations.h" +#include "lib.rs.h" #include #include diff --git a/native/native_rust_library/src/lib.rs b/native/native_rust_library/src/lib.rs --- a/native/native_rust_library/src/lib.rs +++ b/native/native_rust_library/src/lib.rs @@ -1,3 +1,5 @@ +use crate::ffi::string_callback; +use crate::identity::Empty; use lazy_static::lazy_static; use std::sync::Arc; use tokio::runtime::{Builder, Runtime}; @@ -98,6 +100,13 @@ // Crypto Tools fn generate_device_id(device_type: DeviceType) -> Result; } + + unsafe extern "C++" { + include!("RustCallback.h"); + #[namespace = "comm"] + #[cxx_name = "stringCallback"] + fn string_callback(error: String, counter: u32, ret: String); + } } #[derive(Debug)]