Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored crates around and added generics
Co-authored-by: Shark <[email protected]> This is a rather large commit that was needed in order to let the gosub_html5 and gosub_css3 crates to be dependend on eachother. The problem was that they both need eachother and resulted in a cyclic dependency. We solve this usually by moving stuff to the gosub_shared crate, but in this case it would mean we practically move EVERYTHING to that crate. So instead we created a lot of traits in the gosub_shared that can be used by the other crates. This way, both html5 and css3 crates do not need to be depenended on eachother, but only on the gosub_shared crate. However, it crates a lot of extra efford in getting this up and running, the traits and generics means that A LOT of code must be refactored into this system, during which we found out that a lot of code is not on the correct places. We moved around much of the code so it kinda makes sense again. This resulted in the removal of the gosub_styling crate, which was a sort of bridge between the css3-system and other things, which now lives in the css3 crate (which we now properly could manage). There are still problems we're facing, but overal the refactoring looks good. Note that creating this trait setup resulted in redesigning a new engine architecture (unimaginably named "engine_v2"), in which we are redesigning the way we deal with all components. It should resolve all the trait bottlenecks we currently have and hopefully we will be able to refactor the current engine into that one. For now, we keep on working on this system.
- Loading branch information