It has been a while since we've sent an update here - our apologies! We have been hard at work behind the scenes for our BSR beta customers (let us know if you'd like to be involved!), but have some exciting new features to announce for the Buf CLI.
We have released Buf v0.23.0, which, combined with our previous releases since our last announcement, adds the following features:
buf protoc
The command
buf protoc is now available. This is a modern, high-performance, drop-in replacement for
protoc that uses Buf's
internal compiler. When we say high performance, we mean a 7.5x real-world improvement on a modern personal computer:
$ find . -name '*.proto' | wc -l
3064
$ time protoc -I . -o /dev/null $(find . -name '*.proto') 2>/dev/null
real 0m6.025s
user 0m5.104s
sys 0m0.348s
$ time buf protoc -I . -o /dev/null $(find . -name '*.proto') 2>/dev/null
real 0m0.799s
user 0m6.176s
sys 0m0.764s
This compiler is constantly integration tested across thousands of Protobuf files to verify that equivalent FileDescriptorSets are produced, and we have used it in production ourselves for a couple months now.
All flags and features of protoc are supported and compatible, with the following exceptions:
- --encode
- --decode
- --decode_raw
- --descriptor_set_in
- jar/zip output file support (if you didn't know that this feature existed, don't worry)
We plan to add jar/zip file output file support in the near future. The remaining flags can all be added if there is sufficient demand.
Additionally, we have added the flag:
Using this flag will cause buf protoc to run your protoc plugins in parallel on a per-directory basis, resulting in major further performance improvements.
We are providing buf protoc as a mechanism for users to get into the Buf ecosystem with drop-in compatibility, and encourage you to try it out with your existing Protobuf workflows!
buf beta generate
We have also added the command buf beta generate. This command is unstable, and should not be used in production, but allows users to invoke plugins for any type of input. For example:
Thanks for using Buf!