bevyengine / bevy-website

The source files for the official Bevy website
https://bevyengine.org
MIT License
197 stars 342 forks source link

Setup page recomends dynamic linking for linux, but has no mention of incremental building. #642

Closed ZBemo closed 8 months ago

ZBemo commented 1 year ago

It appears to me that in recent versions of rust, debug mode builds use incremental compilation by default. By my understanding, this means that, while using a sufficiently up-to-date rust compiler, when you're recompiling your game after updating it, bevy is already not rebuilt, and is instead simply linked into your program, similar to what happens with bevy_dylib.

Although I might simply be misunderstanding or missing something, it seems to me that the current setup page has no indication of this fact, and believe it may be worthwhile to at least mention that incremental compilation with a good linker will achieve a goal similar to that of using the bevy_dylib feature, but with the added benefit of not having to manage toggling a feature for bevy on and off when building for release/debug, as cargo handles that automatically with incremental builds.

TrialDragon commented 9 months ago

Hmm, looking into this Incremental Compilation has been enabled by default since the release of Rust 1.60 per this Rust blog post (technically it was before, but it got enabled and disabled a bit because bugs were discovered), but also that Incremental Compilation and Dynamic Libraries don't appear to be mutually exclusive in their performance benefits per this article. Perhaps mention that Incremental Compilation does exist and that default compilation is better than it was before, but that the Dynamic Library feature will still grant a benefit to your compilations.

alice-i-cecile commented 8 months ago

Hmm, I think this is ultimately distracting. Users don't need to worry about things that are on by default.

Neat little digression, but I think it's important to keep the flow for new users as smooth as possible.