To update, I ended up using MAP_UD from here, stripped down most of the header to just what MAP_UD relies on: https://github.com/swansontec/map-macro
I know this kind of preprocessor abuse is pretty questionable but I very much prefer it over adding dependencies into the chain especially that this is shared between host and shader code. Thanks everyone!