Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Modern protobuf package management

License

NotificationsYou must be signed in to change notification settings

helsing-ai/buffrs

Repository files navigation


Buffrs

Modern protobuf package management

HelsingBuffrs CrateBuffrs BookBuffrs DocsNix Flake

Quickstart

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

Useful resources:

Synopsis

Modern protobuf package managementUsage: buffrs <COMMAND>Commands:  init       Initializes a buffrs setup  new        Creates a new buffrs package in the current directory  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  login      Logs you in for a registry  logout     Logs you out from a registry  lock       Lockfile related commands  help       Print this message or the help of the given subcommand(s)Options:  -h, --help     Print help  -V, --version  Print version

Motivation

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.Thebiggest problem associated with Protocol Buffers is their distribution.

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

One obvious way is to generate code bindings in the repository containing theProtocol Buffers and publish the generated bindings, but this is associatedwith problems such as language lock-in. You need to proactively publishbindings for any possible language your API consumers may use. Also, instrongly typed languages like Rust, it is hard to extend the behavior ofgenerated code in consuming projects due tothe orphan rule. Summing up: thisapproach 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 afirst-class citizen.

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

Roadmap

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

[8]ページ先頭

©2009-2025 Movatter.jp