23 releases (6 breaking)

0.7.6 Jan 22, 2024
0.7.5 Dec 26, 2023
0.7.1 Nov 3, 2023
0.3.0 Jul 27, 2023

#167 in Command line utilities

Download history 58/week @ 2023-10-27 38/week @ 2023-11-03 8/week @ 2023-11-10 14/week @ 2023-11-17 38/week @ 2023-11-24 119/week @ 2023-12-01 66/week @ 2023-12-08 121/week @ 2023-12-15 103/week @ 2023-12-22 32/week @ 2023-12-29 43/week @ 2024-01-05 12/week @ 2024-01-12 129/week @ 2024-01-19 64/week @ 2024-01-26 48/week @ 2024-02-02 134/week @ 2024-02-09

377 downloads per month

Apache-2.0 and GPL-3.0 licenses

3.5K SLoC


Modern protobuf package management

Helsing Buffrs Crate Buffrs Book Buffrs Docs


$ cargo install buffrs
$ buffrs login
$ buffrs init --api
$ buffrs add <dependency>
$ buffrs install

Useful resources:


Modern protobuf package management

Usage: buffrs <COMMAND>

  init       Initializes a buffrs setup
  lint       Check rule violations for this package
  add        Adds dependencies to a manifest file
  remove     Removes dependencies from a manifest file
  package    Exports the current package into a distributable tgz archive
  publish    Packages and uploads this api to the registry
  install    Installs dependencies
  uninstall  Uninstalls dependencies
  list       Lists all protobuf files managed by Buffrs to stdout
  generate   Generate code from installed buffrs packages
  login      Logs you in for a registry
  logout     Logs you out from a registry
  help       Print this message or the help of the given subcommand(s)

  -h, --help     Print help
  -V, --version  Print version


Protocol buffers are agreeably a great way to define fully typed, language-independent API schemas with strong backward compatibility guarantees. They offer a neat experience for API consumers through generated bindings. The biggest problem associated with Protocol Buffers is their distribution.

  • How do you consume the raw protobuf files of one project reliably in another one?
  • How do you prevent transitive dependencies?
  • How do you publish to a unified registry with package format across languages?

One obvious way is to generate code bindings in the repository containing the Protocol Buffers and publish the generated bindings, but this is associated with problems such as language lock-in. You need to proactively publish bindings for any possible language your API consumers may use. Also, in strongly typed languages like Rust, it is hard to extend the behavior of generated code in consuming projects due to the orphan rule. Summing up: this approach works somehow but hurts frequently.

This is where Buffrs comes in: Buffrs solves this by defining a strict, package-based distribution mechanism and treats Protocol Buffers as a first-class citizen.

This allows you to publish Buffrs packages to a registry and properly depend on them in other projects.


  • Support project manifests and dependency declaration
  • Support package distribution via Artifactory
  • Support tonic as code generation backend
  • Support protoc as code generation backend
  • Implement buffrs-registry, a self-hostable, S3-based registry.
  • Supply tooling around Protocol Buffers, such as bindgen, linting, validation and formatting.


~561K SLoC