The idea is it to write a tool that parses an amethyst projects for specific things, that output can than be used by other tools. For e.g. we could look for all types that implement System
, this can than be used to generate documentation Issue #986 or by the editor to create a main method where the application gets build with specified systems.
There are two ways to implement it. Either as a “rustc drop-in replacement” see this example.
Or with the syn crate that is also used for proc macros.
Advantages of the drop-in approach are probably better type-resolution as it based on rustc, but requires nightly and is probably more likely to break.
Syn works on stable, but here we have only the ast to work with. Which may be enough, but if not would require to re-implement part of the rust compiler.
@torkleyy also mentioned that there where similar plans/ideas regarding scripting support.