protocolbuffers / protocolbuffers/protobuf
Opensource C++ zero-copy API
@sbenzaquen is already working on this.
Since Apr 1, 2026.
- Dominant language
- C++
- Stars
- 72k
- Forks
- 16.3k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 140
Description
Protobuf has zero-copy support to avoid copying string/bytes fields when parsing protobuf messages and it's used pretty much everywhere inside Google, but the feature has never made its way into the opensource repo. Now protobuf 3.0.0 is released and we will probably have more time to look into incremental improvements. The zero-copy API is a good candidate to be included in the next 3.x release.
Opensourcing the zero-copy API will involve:
- opensource related string/buffer classes (Cord and its dependencies).
- un-exclude zero-copy APIs from the message interface (such as ParseFromStringWithAliasing).
- un-exclude the support for ctype = STRING_PIECE and ctype = CORD.
(1) is probably the most difficult part as that's a large chunk of code and it may not be portable.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.