Open alice-i-cecile opened 2 years ago
The alternative is to make bevy_app
export bevy_ecs
somehow; bevy_app
is meaningless without bevy_ecs
anyways.
In some ways, I still think merging them probably makes sense; I can't recall a single usage of bevy_ecs
without bevy_app
which hasn't been misguided.
There are people that want to simply use bevy_ecs
on its own.
There are efforts put forth to de-couple bevy crates, e.g. #2931 comes to mind also.
In some ways, I still think merging them probably makes sense; I can't recall a single usage of bevy_ecs without bevy_app which hasn't been misguided.
Yeah, this is about my perspective too. bevy_app
is a very thin layer, and even if we roll it into bevy_ecs
it can still be ignored.
@CGMossa as the author of #2931: there's a difference here.
bevy_app is fundamentally a fairly thin usability layer on top of bevy_ecs, and doesn't add dependencies fundamentally different from bevy_ecs.
bevy_core, however, doesn't have a real "identity" in what it's for. It conflates multiple purposes, with the bevy_time functionality and glue code sort of arbitrarily in one location.
Moving the bevy_core components around as described in #2931 is an improvement to the organization of bevy code because it clarifies the internal dependency graph, and as a side effect, it makes it more practical to depend on a subset of said graph.
bevy_app and bevy_ecs could go either way; either bevy_app doesn't reëxport significant chunks of bevy_ecs, or bevy_ecs absorbs the orchestration of bevy_app. Either way could clean up the clarity of which crate does what, and merging the orchestration into bevy_ecs is simpler.
Only because bevy_app
is a thin layer around bevy_ecs
shouldn't by itself mean there is no value in keeping things specific to the game engine separate (e. g. CoreStage
).
Thinking of use cases where bevy ecs is used as a general purpose way of structuring an application as ECS outside game development; with a custom event loop, "stages" etc.
Only because bevy_app is a thin layer around bevy_ecs shouldn't by itself mean there is no value in keeping things specific to the game engine separate (e. g. CoreStage ).
I agree, this and things like DefaultPlugins
should live in either the root bevy
module or something like bevy_core
.
Then, move App
, Plugin
and schedule running logic into bevy_ecs
.
What about instead moving Schedule
out of bevy_ecs into bevy_app? This would make bevy_ecs store data, while bevy_app would store app logic.
What about instead moving Schedule out of bevy_ecs into bevy_app? This would make bevy_ecs store data, while bevy_app would store app logic.
That's an interesting split. I like it better than our current setup. I wonder if that dividing line would continue to be clean as we add more functionality 🤔
bevy_app
is a thin layer overbevy_ecs
, and is nearly impossible to use on its own. Moreover, most standalone uses ofbevy_ecs
would be better suited by using the tools provided withbevy_app
; particularly if we had better documentation around custom runners and manually controlling theApp
loop.For example:
bevy_app
re-exports all ofbevy_ecs::event
.This is pointless, because
bevy_ecs
is an explicit dependency of all users ofbevy_app
. Furthermore, it creates confusion in the main Bevy docs, since thebevy_app
version is listed.This re-export can and should just be removed.