Questions tagged [protoc]

protoc is the compiler for .proto files. It generates language bindings for the messages and/or RPC services from .proto files. protoc is a native executable, the scripts under this directory build and publish a protoc executable (a.k.a. artifact) to Maven repositories. The artifact can be used by build automation tools so that users would not need to compile and install protoc for their systems.

taken from google documentation

387 questions
2
votes
0 answers

file upload with HTTP/JSON to gRPC Transcoding

in this page it is described how to automatically support REST requests in an existing GRPC server https://cloud.google.com/endpoints/docs/grpc/transcoding But there is no mention for file upload support . For example is it possible to support…
demi
  • 21
  • 3
2
votes
2 answers

Re-encode a protobuf with protoc and no schema

I'm playing with an app and trying to reverse engineer data files that it can export and import. The files are protobufs in binary. My goal is to be able to export a file, convert to text, modify it with additional data records, re-encode to…
JustinB
  • 31
  • 4
2
votes
1 answer

Protocol Buffer Field Options in Javascript/NodeJS

How does one get the options associated with a protocol buffer field? Suppose I have a field with a custom option like: syntax = "proto3"; package main; import "google/protobuf/descriptor.proto"; extend google.protobuf.FieldOptions { bool…
pariola
  • 923
  • 12
  • 27
2
votes
1 answer

Installing pyCLD3 on Windows 10

I'm trying to install pyCLD3 on Windows 10 (python 3.8.5): pip install pycld3 on Windows does not work (as expected, it's mentioned in the README file on their Github). However, the instructions how to install it from Source are not clear, it only…
Grintas
  • 46
  • 1
  • 5
2
votes
1 answer

swift protoc conversion fails with error "google.type.LatLng" is not defined

I am converting .proto files to swift files using command protoc --swift_out=. my_proto_file.proto protoc version being used is libprotoc 3.13.0. my_proto_file has several import statements like import "google/protobuf/duration.proto"; import…
Sandeep Bhandari
  • 19,999
  • 5
  • 45
  • 78
2
votes
1 answer

Is there a way to specify output imports for generated C++ code when using ProtocolBuffers?

I'm trying to compile C++ code into a single binary using .proto files. My current process has 2 steps; Generate C++ code from 3 .proto files using protoc. Compile the generated code and my own C++ code into a single .o file. However, when I try…
Tahmm
  • 43
  • 2
  • 8
2
votes
1 answer

How to allow minus sign for package name in .proto file?

Here is the .proto file I used: pkg/apis/workflow/v1alpha1/generated.proto syntax = 'proto2'; package go-server.com.argo-new.pkg.apis.workflow.v1alpha1; import "k8s.io/api/core/v1/generated.proto"; import…
2
votes
1 answer

Import "google/protobuf/timestamp.proto" was not found or had errors

I am trying to use Timestamp and have imported it in protobuf message - import "google/protobuf/timestamp.proto"; message TriggerDataMsg { google.protobuf.Timestamp start_time = 1; google.protobuf.Timestamp end_time = 2; …
Rahul Vedpathak
  • 1,346
  • 3
  • 16
  • 30
2
votes
1 answer

Problems running protoc with proto_path to generate Gocode

I am having a little bit of an issue to correctly understand the format of running protoc to generate Go source from proto files. I have tried protoc --proto_path=api/auth-service api/auth-service/proto/*.proto --go_out=pluigins=grpc:pb and protoc…
Mark Smith
  • 437
  • 1
  • 6
  • 11
2
votes
2 answers

How to display protoc-gen-go gzipped FileDescriptorProto as plaintext?

protoc-gen-go generates something like this, at the end of the generated go files: var fileDescriptor_13c75530f718feb4 = []byte{ // 2516 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff,…
Karel Bílek
  • 36,467
  • 31
  • 94
  • 149
2
votes
1 answer

Cannot compile protoc-generated (C++) classes

I'm currently having some troubles with compiling protobuf-generated C++ code. protoc runs correctly and doesn't show any warnings, however when I try to compile the generated C++ code so I can build a static library, g++ shows me the following…
SimonC
  • 1,547
  • 1
  • 19
  • 43
2
votes
0 answers

libprotoc.so.22 file not found but the installation of protobuf-all-3.10.0 installed libprotoc.so.21

In Ubuntu 18.04.02 Server Edition I downloaded from here Protobuf-Releases the protobuf-all-3.10.0.zip and, following the indications here ProtocolBuffersReadme I installed in /usr/local/lib/ the libraries: (base) marco@pc:/usr/local/lib$ ls -lah |…
user2315094
  • 759
  • 3
  • 16
  • 29
2
votes
1 answer

Create custom protoc plugin in Java

I'm trying to write a custom ProtoC plugin, but I can't make the protoc working with jar files. Seems it tries to run it as an application and I've got: .../libs/plugin-java-protobuf-1.0-jvm8.jar: program not found or is not executable I've seen…
Uraty
  • 257
  • 2
  • 7
2
votes
2 answers

Protobuf: Understanding the compiled output of proto files

**Hi All, I am new to the protobuf. I am trying to understand the basics here. I have created the sample proto file as Test.proto in directory /path/to/Directory/: syntax = "proto2"; message Person { required string name = 1; required int32 id…
RC0993
  • 898
  • 1
  • 13
  • 44
2
votes
2 answers

Generated files look different from the example

please help me. The below is given in .../gopath/src/google.golang.org/grpc/examples/helloworld/helloworld/helloworld.proto ============================================== syntax = "proto3"; option java_multiple_files = true; option java_package =…
umlspec
  • 21
  • 3