ProtocolBuffer
Creator: |
Contents
Overview
ProtocolBuffer is a D library encompassing the basic tools required to compile .proto definition files into code and additional functions that are used by the resulting source file. The backend library is separated from the definition compiler for now, but those may merge in the future.
Options
At the moment, only a handful of options are supported and all others will be ignored. Options are not currently accessible at runtime. Supported options are packed, deprecated, and default.
Extensions
Extensions are supported via a slightly modified syntax. The following code snippet retrieves the bar extension from the foo message:
foo.GetExtension!(bar);
This code snippet sets bar:
foo.SetExtension!(bar)(8675309);
Yes, it's different from other implementations, but I wasn't able to implicitly specialize template functions on a constant given available language constructs.
Todo
- compiler command line option support
- proper option support
- support groups (unlikely, since they are deprecated)
- support services (this may not happen at all)