I am working on building document templating lib similar to jade/slim. I see that there is the ability to write a compiler plugin and I wondered if one can or in the future will be able to write a plugin that targets certain types of files and process them before they get passed to the compiler.
For example, rust will compile all
.rs files. I would like a way that a plugin can tell the compiler to include files with extension
.xyz and these files get passed through the plugin so that it can generate the valid rust code to be compiled.
This would allow me to have compile time checked templates (that are written in HTML, XML, etc…) and would prevent a bunch of serialization that I have to do at runtime for dynamic data access.
I hope that made some sense, if not let me know I will try to improve it.