Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3504587
D4807.id15550.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4807.id15550.diff
View Options
diff --git a/services/tunnelbroker/CMakeLists.txt b/services/tunnelbroker/CMakeLists.txt
--- a/services/tunnelbroker/CMakeLists.txt
+++ b/services/tunnelbroker/CMakeLists.txt
@@ -9,6 +9,7 @@
endif(COMMAND cmake_policy)
set(CMAKE_CXX_STANDARD 17)
+
# For C++17 on MacOS, we must set minimum target to 10.14+
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.14)
@@ -39,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
@@ -67,11 +70,10 @@
find_package(OpenSSL REQUIRED)
find_package(glog)
-# Corrosion Rust integration
+# Corrosion and CXX Rust integration
find_package(Corrosion REQUIRED)
-corrosion_import_crate(MANIFEST_PATH "rust-notifications/Cargo.toml")
-set(RUST_HEADERS_INCLUDE_DIR "rust-notifications/extern")
-set(RUST_LIBS "rust-notifications")
+include(${_cmake_components_path}/corrosion-cxx.cmake)
+add_library_rust(PATH rust-notifications NAMESPACE rustlib)
file(GLOB_RECURSE SOURCE_CODE "./src/*.cpp")
@@ -101,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");
+ println!("cargo:rerun-if-changed=src/lib.rs");
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 9:35 AM (19 h, 27 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2687276
Default Alt Text
D4807.id15550.diff (1 KB)
Attached To
Mode
D4807: [services] Tunnelbroker - Update CMakeLists and Cargo build with the CXX integration updates
Attached
Detach File
Event Timeline
Log In to Comment