diff --git a/services/tunnelbroker/CMakeLists.txt b/services/tunnelbroker/CMakeLists.txt --- a/services/tunnelbroker/CMakeLists.txt +++ b/services/tunnelbroker/CMakeLists.txt @@ -70,7 +70,7 @@ # Corrosion and CXX Rust integration find_package(Corrosion REQUIRED) include(${_shared_path}/cmake/corrosion-cxx.cmake) -add_library_rust(PATH rust-notifications NAMESPACE rustlib) +add_library_rust(PATH rust-lib NAMESPACE rust) file(GLOB_RECURSE SOURCE_CODE "./src/*.cpp") @@ -92,7 +92,7 @@ glog::glog double-conversion::double-conversion Folly::folly - rustlib::rust-notifications + rust::rust-lib ) # SERVER @@ -126,6 +126,7 @@ # TEST option(BUILD_TESTING "Build test suite" ON) option(WITH_GFLAGS "Turn on GFLAGS" ON) + if(BUILD_TESTING) file(GLOB TEST_CODE "./test/*.cpp") list(FILTER SOURCE_CODE EXCLUDE REGEX "./src/server.cpp") diff --git a/services/tunnelbroker/rust-notifications/Cargo.lock b/services/tunnelbroker/rust-lib/Cargo.lock rename from services/tunnelbroker/rust-notifications/Cargo.lock rename to services/tunnelbroker/rust-lib/Cargo.lock --- a/services/tunnelbroker/rust-notifications/Cargo.lock +++ b/services/tunnelbroker/rust-lib/Cargo.lock @@ -847,7 +847,7 @@ ] [[package]] -name = "rust-notifications" +name = "rust-lib" version = "0.1.0" dependencies = [ "a2", diff --git a/services/tunnelbroker/rust-notifications/Cargo.toml b/services/tunnelbroker/rust-lib/Cargo.toml rename from services/tunnelbroker/rust-notifications/Cargo.toml rename to services/tunnelbroker/rust-lib/Cargo.toml --- a/services/tunnelbroker/rust-notifications/Cargo.toml +++ b/services/tunnelbroker/rust-lib/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "rust-notifications" -description = "Library for sending iOS and Android push notifications" +name = "rust-lib" +description = "Rust code library to call from the C++ codebase" homepage = "https://comm.app" version = "0.1.0" license = "BSD-3-Clause" diff --git a/services/tunnelbroker/rust-notifications/build.rs b/services/tunnelbroker/rust-lib/build.rs rename from services/tunnelbroker/rust-notifications/build.rs rename to services/tunnelbroker/rust-lib/build.rs diff --git a/services/tunnelbroker/rust-notifications/src/lib.rs b/services/tunnelbroker/rust-lib/src/lib.rs rename from services/tunnelbroker/rust-notifications/src/lib.rs rename to services/tunnelbroker/rust-lib/src/lib.rs diff --git a/services/tunnelbroker/rust-notifications/src/notifications/apns.rs b/services/tunnelbroker/rust-lib/src/notifications/apns.rs rename from services/tunnelbroker/rust-notifications/src/notifications/apns.rs rename to services/tunnelbroker/rust-lib/src/notifications/apns.rs diff --git a/services/tunnelbroker/rust-notifications/src/notifications/fcm.rs b/services/tunnelbroker/rust-lib/src/notifications/fcm.rs rename from services/tunnelbroker/rust-notifications/src/notifications/fcm.rs rename to services/tunnelbroker/rust-lib/src/notifications/fcm.rs diff --git a/services/tunnelbroker/rust-notifications/src/notifications/mod.rs b/services/tunnelbroker/rust-lib/src/notifications/mod.rs rename from services/tunnelbroker/rust-notifications/src/notifications/mod.rs rename to services/tunnelbroker/rust-lib/src/notifications/mod.rs diff --git a/services/tunnelbroker/src/Service/TunnelbrokerServiceImpl.cpp b/services/tunnelbroker/src/Service/TunnelbrokerServiceImpl.cpp --- a/services/tunnelbroker/src/Service/TunnelbrokerServiceImpl.cpp +++ b/services/tunnelbroker/src/Service/TunnelbrokerServiceImpl.cpp @@ -8,7 +8,7 @@ #include "GlobalTools.h" #include "Tools.h" -#include "rust-notifications/src/lib.rs.h" +#include "rust-lib/src/lib.rs.h" #include "rust/cxx.h" #include