Remove the generated directory and the various re-exports.
namespace docs have been extracted from the respective mod.rs to
.md files in api_generator/docs, and are inserted in the generated
source file.
namespace sources are generated directly in the src directory
the generator can now insert generated sections in regular source
files based on GENERATE-BEGIN and GENERATE-END markers. This is
used to generate the namespace module list in the main lib.rs and
merge generated with manual code in params.rs
generated and merged source files are listed in src/.generated.toml
so that the generator can cleanup on start.
Before considering merging generated code with special markers we
experimented with the include!() macro, but this didn't work well:
rustfmt will not reformat include files
mod statement look for files relative to the source file, so
include files have to be located in the same directory as their
includer, while locating them in a dedicated directory would have
provided a nicer organization.
Merging generated sections provides a more natural source code layout.
Remove the
generated
directory and the various re-exports.mod.rs
to.md
files in api_generator/docs, and are inserted in the generated source file.src
directoryGENERATE-BEGIN
andGENERATE-END
markers. This is used to generate the namespace module list in the mainlib.rs
and merge generated with manual code inparams.rs
src/.generated.toml
so that the generator can cleanup on start.Before considering merging generated code with special markers we experimented with the
include!()
macro, but this didn't work well:mod
statement look for files relative to the source file, so include files have to be located in the same directory as their includer, while locating them in a dedicated directory would have provided a nicer organization.Merging generated sections provides a more natural source code layout.