diff --git a/native/cpp/CommonCpp/grpc/grpc_client/build.rs b/native/cpp/CommonCpp/grpc/grpc_client/build.rs --- a/native/cpp/CommonCpp/grpc/grpc_client/build.rs +++ b/native/cpp/CommonCpp/grpc/grpc_client/build.rs @@ -1,4 +1,6 @@ fn main() { tonic_build::compile_protos("../protos/identity.proto") .unwrap_or_else(|e| panic!("Failed to compile protos {:?}", e)); + let _cxx_build = cxx_build::bridge("src/lib.rs"); + println!("cargo:rerun-if-changed=src/hello.c"); } diff --git a/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs b/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs --- a/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs +++ b/native/cpp/CommonCpp/grpc/grpc_client/src/lib.rs @@ -48,6 +48,9 @@ ); } +#[cxx::bridge(namespace = "identity")] +mod ffi {} + pub struct Client { identity_client: IdentityServiceClient, }