PR, which brought up the discussion:
I do not want to prevent the PR from being merged, since it is an improvement, so @khionu asked me to open a topic over here.
To sum up the discussion: Feature Gates are a nice way to select what has should be included, and leaving out not-needed parts speeds up the compilation. In this context, I suggested also making the renderer and the input optional, so that things like headless servers and bots could benefit from the same advantages.
Khionu also added that the purpose of the Amethyst crate might play an important role in this discussion. In my opinion, the Amethyst crate is a convenience wrapper over all the different modules. Making the wrapper more dynamic would not change it to an “entry point that everything could use”. It might, however, be important in what way this wrapper can be configured, because stupidly making every single feature available would be no better then making a new crate from every module. That’s why I want to suggest to make the wrapper configurable in a sense that default scenarios are supported. In addition to
default, which is available right now, the list could look like this. For quick and dirty prototypes, the wrapper still delivers everything, but there are also groups to quickly set up something common.
[features] # Scenarios: bench = ["animation", "audio", "gltf", "renderer"] default = ["animation", "audio", "gltf", "input", "locale", "network", "renderer"] server = ["gltf", "network"] # ... # Or pick w/e you need animation = [ "amethyst_animation" ] audio = [ "amethyst_audio" ] gltf = [ "amethyst_gltf", "amethyst_animation" ] input = [ "amethyst_input" ] locale = [ "amethyst_locale" ] network = [ "amethyst_network" ] renderer = [ "amethyst_renderer" ]
Unfortunately, I don’t know how much work this would be and if it is useful at all, so I would like to hear your opinions!