Page MenuHomePhabricator

D4807.id16362.diff
No OneTemporary

D4807.id16362.diff

diff --git a/services/tunnelbroker/CMakeLists.txt b/services/tunnelbroker/CMakeLists.txt
--- a/services/tunnelbroker/CMakeLists.txt
+++ b/services/tunnelbroker/CMakeLists.txt
@@ -40,9 +40,11 @@
if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL "/transferred/tunnelbroker")
# Inside the docker build contex
set(_proto_path "grpc")
+ set(_shared_path "../shared")
else()
# Inside repo
set(_proto_path "../../native/cpp/CommonCpp/grpc")
+ set(_shared_path "../../shared")
endif()
# Shared Comm protos
@@ -68,6 +70,11 @@
find_package(OpenSSL REQUIRED)
find_package(glog)
+# Corrosion and CXX Rust integration
+find_package(Corrosion REQUIRED)
+include(${_shared_path}/cmake/corrosion-cxx.cmake)
+add_library_rust(PATH rust-notifications NAMESPACE rustlib)
+
file(GLOB_RECURSE SOURCE_CODE "./src/*.cpp")
set(
@@ -96,6 +103,7 @@
glog::glog
double-conversion::double-conversion
Folly::folly
+ rustlib::rust-notifications
)
# SERVER
diff --git a/services/tunnelbroker/rust-notifications/build.rs b/services/tunnelbroker/rust-notifications/build.rs
new file mode 100644
--- /dev/null
+++ b/services/tunnelbroker/rust-notifications/build.rs
@@ -0,0 +1,4 @@
+fn main() {
+ let _build = cxx_build::bridge("src/lib.rs").flag_if_supported("-std=c++17");
+ println!("cargo:rerun-if-changed=src/lib.rs");
+}

File Metadata

Mime Type
text/plain
Expires
Sat, Sep 28, 9:09 AM (33 m, 33 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2190250
Default Alt Text
D4807.id16362.diff (1 KB)

Event Timeline