2

protoc.exe is built for windows. Every other distro, you have to compile protoc yourself to use it. We really want to drop something like protoc into our project but then have the hassle on anyone on a different OS has alot of work to do to set it up. Therefore, for this project protoc is kind of dead basically.

Is there another library like protoc that generates objects/DTOs and marshallers/unmarshallers that has a cross-platform compiler? (Java compiler would be great as we could wire it into our gradle builds).

thanks, Dean

Dean Hiller
  • 19,235
  • 25
  • 129
  • 212

3 Answers3

2
  1. Avro Project is similar to Protocol Buffers (has it's own format though) and has a Java Compiler. Avro definition can be in either IDL (not unlike Protocol Buffers) and JSon. One problem is the Jar for Avro is large (it uses a lot of other Jars

  2. You could look a compiling protoc to Java-Byte-Code. There are several projects available for this see cibyl also lists several cross compilers. The result will be slow and large but it may work.

Community
  • 1
  • 1
Bruce Martin
  • 10,358
  • 1
  • 27
  • 38
0

Protocol buffer are supposed to be cross-platform compiler

There are other alternatives to Protoc buffer such as xstream, Jackson, GSON. There is detailed set of answers Here.

Hope this helps!

Community
  • 1
  • 1
prashantsunkari
  • 959
  • 7
  • 21
  • yeah, IF you compile it. like I said in my post. I don't want developers needing to compile it!!! I have used protoc in the past when everyone was on windows so it was easier(communicating between java and C# ). Jackson is for json, not binary. I am aware of bson4jackson project though not sure how stable it is. My wanting of protoc-like library, it is being binary that was extremely important. – Dean Hiller May 10 '13 at 18:02
0

I haven't tried if it works, put possibly you could run protoc over JVM. There exists several compilers for running C++ on JVM.

See Compiling C++ for the JVM.

Community
  • 1
  • 1
jpa
  • 10,351
  • 1
  • 28
  • 45