Protobuf is a fantastic way to programmatically define your APIs and generate away a lot of the common work we perform as software engineers to communicate across our services. Here at Buf, we believe the eventual promise of Protobuf is for us to stop publishing English-language API specs, and instead move to generated SDKs that we all consume.
Remote packages is the movement towards this promise. With remote packages, Buf will take your modules and Protobuf plugins, add a little elbow grease, and generate full-serve packages for you to consume just like any third-party library in your native programming language. This means you don't have to worry about Protobuf code generation at all - you can push modules to the BSR and install code stubs generated from those modules using dependency management tools like npm, go, mvn, and gradle.
# Get the Connect client and server packages for the buf.build/bufbuild/eliza module $ go get buf.build/gen/go/bufbuild/eliza/bufbuild/connect-go
# Install the Connect client packages for the buf.build/bufbuild/eliza module $ npm config set @buf:registry https://buf.build/gen/npm/v1 $ npm install @buf/bufbuild_eliza.bufbuild_connect-es
<repositories> <!-- ... --> <repository> <name>Buf Maven Repository</name> <id>buf</id> <url>https://buf.build/gen/maven</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <dependencies> <!-- ... --> <dependency> <groupId>build.buf.gen</groupId> <artifactId>bufbuild_eliza_bufbuild_connect-kotlin</artifactId> <version>0.1.6.1.20230403200515.aed131420688</version> </dependency> </dependencies>
- Zero tooling to install: forget about plugins or Protobuf compilers entirely.
- API producers can provide two lines of installation instructions instead of publishing their own SDKs.
- No need to keep plugins and supporting library versions in sync.
- Dependabot and other tools pick up version changes.
- Any organization-wide caching used for your existing programming languages can be used in the exact same way.
The BSR currently supports Remote Packages for these languages:
We plan to support Remote Packages for additional languages in the near future, including (in rough priority order):