|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: 'Quarkus gRPC Zero' |
| 4 | +date: 2025-09-19 |
| 5 | +tags: quarkus grpc |
| 6 | +synopsis: 'gRPC code generation that runs on the JVM so you do not need native protoc binaries.' |
| 7 | +author: andreatp |
| 8 | +------------------- |
| 9 | +
|
| 10 | += Quarkus gRPC Zero |
| 11 | +
|
| 12 | +*Make gRPC code generation portable: no native protoc, no surprises.* |
| 13 | +
|
| 14 | +== TL;DR |
| 15 | +
|
| 16 | +Quarkus gRPC Zero brings gRPC code generation into the JVM so you no longer need native 'protoc' binaries. Add the extension, build your project, and the generated stubs appear just like before. |
| 17 | +
|
| 18 | +The important outcome is consistent, portable builds across developer machines, CI, containers, and even unusual architectures. |
| 19 | +
|
| 20 | +== Why this matters |
| 21 | +
|
| 22 | +If you have spent time wrestling with platform-specific `protoc` binaries, cross-compiled plugins, or flaky CI images, you know the cost: slow onboarding, fragile builds, extra Docker layers, and ongoing maintenance. Quarkus gRPC Zero removes that operational burden so teams can focus on APIs and features instead of shipping native binaries for every target OS and architecture. |
| 23 | +
|
| 24 | +== What Quarkus gRPC Zero does |
| 25 | +
|
| 26 | +Quarkus gRPC Zero runs the `protoc` compilation inside the JVM as a pure Java codegen step. |
| 27 | +
|
| 28 | +From a developer point of view nothing changes: you keep writing `.proto` files, run your Quarkus build, and use the generated sources. |
| 29 | +
|
| 30 | +The difference is that builds are portable and predictable on any JVM host. |
| 31 | +
|
| 32 | +== Benefits |
| 33 | +
|
| 34 | +* Portable builds that behave the same on laptops, CI, containers, and edge devices. |
| 35 | +* Simpler CI and smaller images because you do not need to package native executables. |
| 36 | +* Less maintenance for platform teams who no longer manage platform-specific toolchains. |
| 37 | +* A small, self-contained Java dependency that performs code generation. |
| 38 | +
|
| 39 | +== Quick start |
| 40 | +
|
| 41 | +Add the extension to your project. Replace 'VERSION' with the release you choose. |
| 42 | +
|
| 43 | +[source,xml] |
| 44 | +---- |
| 45 | +<dependency> |
| 46 | + <groupId>io.quarkus</groupId> |
| 47 | + <artifactId>quarkus-grpc</artifactId> |
| 48 | + <exclusions> |
| 49 | + <exclusion> |
| 50 | + <groupId>io.quarkus</groupId> |
| 51 | + <artifactId>quarkus-grpc-codegen</artifactId> |
| 52 | + </exclusion> |
| 53 | + </exclusions> |
| 54 | +</dependency> |
| 55 | +<dependency> |
| 56 | + <groupId>io.quarkiverse.grpc.zero</groupId> |
| 57 | + <artifactId>quarkus-grpc-zero</artifactId> |
| 58 | + <version>VERSION</version> |
| 59 | +</dependency> |
| 60 | +---- |
| 61 | +
|
| 62 | +If you are migrating from an existing Quarkus gRPC setup, you need to exclude the 'quarkus-grpc-codegen' artifact from your 'quarkus-grpc' dependency and add 'quarkus-grpc-zero' instead. |
| 63 | +Build your project as usual and generated sources will appear during the build step. |
| 64 | +
|
| 65 | +== Example workflow |
| 66 | +
|
| 67 | +. Add the 'quarkus-grpc' dependency with exclusions for 'quarkus-grpc-codegen' and include 'quarkus-grpc-zero'. |
| 68 | +. Keep authoring '.proto' files as before. |
| 69 | +. Run the Quarkus build. Generated stubs will be produced on the JVM and compilation completes normally. |
| 70 | +
|
| 71 | +Outcome: the developer ergonomics are unchanged, but there are no native tools to manage. |
| 72 | +
|
| 73 | +== When to choose this extension |
| 74 | +
|
| 75 | +* You want hermetic, reproducible builds with fewer external artifacts. |
| 76 | +* You support multiple platforms or unusual architectures and want to avoid maintaining binaries. |
| 77 | +
|
| 78 | +== Current status and roadmap |
| 79 | +
|
| 80 | +Quarkus gRPC Zero is ready for early adopters. |
| 81 | +
|
| 82 | +It passes integration tests and works in typical Quarkus builds. |
| 83 | +We are actively improving the project and welcome feedback, real-world testing, and bug reports to guide stabilization and future features. |
| 84 | +
|
| 85 | +== Try it and report any errors |
| 86 | +
|
| 87 | +Please try Quarkus gRPC Zero in your projects. |
| 88 | +We want real-world feedback and we especially want to hear about any errors, edge cases, or surprising behavior you encounter. |
| 89 | +We are happy to quickly to turn things around to fix outstanding bugs. |
| 90 | +
|
| 91 | +* Clone or add the extension to a test project. |
| 92 | +* Build on your laptop, in CI, and in any container or architecture you support. |
| 93 | +* If you see an error, open a ticket at the project repository: https://github.com/quarkiverse/quarkus-grpc-zero/issues[quarkiverse/quarkus-grpc-zero issues] |
| 94 | +
|
| 95 | +*Call to action: try the extension today and report the results.* Your reports will directly shape the project and help us make code generation reliable for everyone. |
| 96 | +
|
| 97 | +== Closing |
| 98 | +
|
| 99 | +Quarkus gRPC Zero is about outcomes: consistent builds and no more native `protoc` maintenance. |
| 100 | +Try it, use it in your CI, and please report any feedback so we can make it production-ready for every environment. |
0 commit comments