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(_cmake_components_path "./cmake-components") else() # Inside repo set(_proto_path "../../native/cpp/CommonCpp/grpc") + set(_cmake_components_path "../lib/cmake-components") 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/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"); +}