diff --git a/native/native_rust_library/build.rs b/native/native_rust_library/build.rs --- a/native/native_rust_library/build.rs +++ b/native/native_rust_library/build.rs @@ -2,10 +2,7 @@ tonic_build::configure() .build_server(false) .compile( - &[ - "../../shared/protos/identity_client.proto", - "../../shared/protos/tunnelbroker.proto", - ], + &["../../shared/protos/identity_client.proto"], &["../../shared/protos"], ) .unwrap_or_else(|e| panic!("Failed to compile protos {:?}", e)); 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 @@ -5,16 +5,12 @@ use tokio::runtime::{Builder, Runtime}; use tonic::{transport::Channel, Status}; use tracing::instrument; -use tunnelbroker::tunnelbroker_service_client::TunnelbrokerServiceClient; mod crypto_tools; mod identity_client; mod identity { tonic::include_proto!("identity.client"); } -mod tunnelbroker { - tonic::include_proto!("tunnelbroker"); -} use crypto_tools::generate_device_id; use identity::identity_client_service_client::IdentityClientServiceClient; @@ -94,12 +90,6 @@ #[cxx_name = "identityGenerateNonce"] fn generate_nonce(promise_id: u32); - // Tunnelbroker Service Client - type TunnelbrokerClient; - - #[cxx_name = "TunnelbrokerInitializeClient"] - fn initialize_tunnelbroker_client(addr: String) -> Box; - // Crypto Tools fn generate_device_id(device_type: DeviceType) -> Result; } @@ -242,19 +232,6 @@ )) } -#[derive(Debug)] -pub struct TunnelbrokerClient { - tunnelbroker_client: TunnelbrokerServiceClient, -} - -fn initialize_tunnelbroker_client(addr: String) -> Box { - Box::new(TunnelbrokerClient { - tunnelbroker_client: RUNTIME - .block_on(TunnelbrokerServiceClient::connect(addr)) - .expect("Failed to create Tokio runtime for the Tunnelbroker client"), - }) -} - #[derive( Debug, derive_more::Display, derive_more::From, derive_more::Error, )]