Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

"empty.proto" is missing. #156

@zsluedem

Description

@zsluedem

#31 There is a related issue. But it can not solve the problem.

syntax = "proto3";
import "google/protobuf/empty.proto";


service TestService {
  rpc test(google.protobuf.Empty) returns (google.protobuf.Empty) {}
}

build.rs

extern crate protoc_rust_grpc;

fn main() {
    protoc_rust_grpc::run(protoc_rust_grpc::Args {
        out_dir: "src",
        includes: &["protobuf"],
        input: &["protobuf/test.proto"],
        rust_protobuf: true,
        ..Default::default()
    }).expect("protoc-rust-grpc");
}

would generate


pub trait TestService {
    fn test(&self, o: ::grpc::RequestOptions, p: super::empty::Empty) -> ::grpc::SingleResponse<super::empty::Empty>;
}

// client

pub struct TestServiceClient {
    grpc_client: ::std::sync::Arc<::grpc::Client>,
    method_test: ::std::sync::Arc<::grpc::rt::MethodDescriptor<super::empty::Empty, super::empty::Empty>>,
}

super::empty::Empty is not available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions