Examples
These examples show Protobuf-ES beyond the first message: size-delimited streams, custom code generation, Any, registries, custom options, and reflection. Start with Getting started if you have not generated code yet.
Runnable packages
Section titled “Runnable packages”- Node message store: a Node application that writes multiple Protobuf messages to a binary file and reads them back as a stream. Based on
packages/protobuf-example. - Twirp plugin: a custom plugin that generates TypeScript clients from Protobuf service definitions. Based on
packages/protoplugin-example.
Patterns
Section titled “Patterns”- Any with registries: pack messages into
google.protobuf.Anyand unpack them when only a registry is available. - Custom option redaction: define a field option and use reflection to clear annotated fields.