The current guidance of putting code generated by a build.rs script into src/ is generally not a good idea (see here). It leads to it being checked into source control and people trying to make edits to it.
Trying to put the current output of codegen into OUT_DIR causes errors to do with inner attributes not being permitted. This PR implements a config parameter clippy_attributes which turns off generating these attributes by default. They are turned back on for the CLI as it is assumed the user will be placing the output into src/ in that case.
Also see prost_build for a good template for how code generation from an interface format should work.
The current guidance of putting code generated by a
build.rs
script intosrc/
is generally not a good idea (see here). It leads to it being checked into source control and people trying to make edits to it.Trying to put the current output of
codegen
intoOUT_DIR
causes errors to do with inner attributes not being permitted. This PR implements a config parameterclippy_attributes
which turns off generating these attributes by default. They are turned back on for the CLI as it is assumed the user will be placing the output intosrc/
in that case.Also see
prost_build
for a good template for how code generation from an interface format should work.