I think dogfooding is a very good idea.
So there are a few parts to the problem
- Converting from a declarative description of a UI to 2D primitives.
- Converting those primitives to draw calls
- Rendering the draw calls to a texture
- Blit the texture into the final image (with 3D transformations if you so desire.
Using this approach encourages the use of vector graphics for UI, meaning that scaling works beautifully, and text is nicely relaid etc. There is an alternative - just use bitmaps and fixed widths, but this suffers from inflexibility.
1 is all the layout stuff above, 2 is lyon, 3 is a draw pass (or pipeline or stage, I need to understand rendering terminology better), and 4 is part of the final stage of compositing the final image.
In terms of a new crate, you could possibly try to abstract out the layout logic, although I think to start with I’d just like to build it into amethyst to keep things simple. It just instinctively feels like you’d need as much glue code in amethyst as you would need actual layout code if it was built in.
Or were you thinking of a crate in a different area?