Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

bsr-quickstart

Minimal end-to-end project using the published buf.build/anthropics/buffa BSR remote plugin — no local protoc or plugin install required.

buf generate   # only needed after editing proto/ — generated code is checked in
cargo run

Layout

File What
proto/example/v1/greeting.proto A small message with scalars, a WKT, an enum, and a oneof
buf.yaml buf module config rooted at proto/
buf.gen.yaml remote: buf.build/anthropics/buffa with file_per_package=true
src/gen/example.v1.rs Generated by buf generate; one self-contained .rs per proto package
src/gen/mod.rs Hand-written: nests pub mod example { pub mod v1 { include!("…") } }
src/main.rs Builds, encodes/decodes (binary + JSON), and reads a zero-copy view

How this differs from the other examples

Example Codegen path When to use
bsr-quickstart (this one) remote: buf.build/anthropics/buffa + file_per_package=true + hand-written mod.rs Consumer projects that want the lightest possible toolchain footprint
logging local: protoc-gen-buffa + local: protoc-gen-buffa-packaging Generated mod.rs with no hand-written wiring; needs local plugin install
addressbook buffa-build in build.rs prost-build-style integration; needs protoc on PATH

The full set of build setups is documented in the user guide.