Support delimited protobuf format
- Dominant language
- Dart
- Stars
- 572
- Forks
- 196
- Avg merge
- 1h 59m
- Merged PRs (30d)
- 2
Description
Original issue https://github.com/dart-lang/protobuf/issues/107
This delimited proto format is used commonly when sending protobufs over stdin/stdout (which is what bazel uses it for). Essentially, you just need to stick the size of the message in an int32 in front of the buffer.
Alternatively, could we get an option on writeToBuffer which automatically prepends this delimiter to the buffer?
See example implementation in bazel_worker https://github.com/dart-lang/bazel_worker/blob/0bff114ec1f3e2e98e1238e7d3f92ac87c43990e/lib/src/utils.dart#L7
See `writeDelimitedTo` from the java implementation, https://github.com/google/protobuf/blob/c44ca26fe89ed8a81d3ee475a2ccc1797141dbce/java/core/src/main/java/com/google/protobuf/MessageLite.java#L129
Contributor guide
Research direction
Start with the bazel_worker utils.dart example and Java's writeDelimitedTo reference, then inspect the Dart runtime entry point for writeToBuffer. Define how delimited protobuf messages should be exposed and verify that the resulting buffer uses the requested length prefix; no repository test or implementation file is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100