config_struct icon indicating copy to clipboard operation
config_struct copied to clipboard

Values that change at build time?

Open rope-hmg opened this issue 3 years ago • 0 comments

In my current project I'm using this crate for my standard config, but I have two fields that I have to do something custom for. Their values are replaced with something else at build time. For example one of them is a time stamp. For this, I'm generating the time stamp in the build.rs and then just formatting some rust code string and writing it to a file.

It would be nice if there were some mechanism within this crate to add these kinds of fields. They don't change for the lifetime of the compiled application, but can't be known outside of build time. The kind of solution I'm looking for is something like a replacement map. Not sure how well that would play with the nested data formats though.

rope-hmg avatar May 05 '21 13:05 rope-hmg