ccommon icon indicating copy to clipboard operation
ccommon copied to clipboard

rust proc_macro for config structs

Open brayniac opened this issue 4 years ago • 0 comments

Add a proc_macro for the config structs (eg: ccommon-stream, ccommon-debug, ...)

Problem

In #245 we added configuration structs for the ccommon components, however there is a significant amount of boilerplate.

Solution

I propose adding a proc_macro for generating code to reduce the boilerplate. It should be possible to define the overall configuration struct, with its default values in one location and let the proc_macro expand that out to a complete struct definition, accessors, and corresponding serde annotations.

brayniac avatar May 26 '20 22:05 brayniac