-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Objective Closes #201. Allows users to quickly try out different configurations without modifying `Cargo.toml`. For us, it's most useful for finding the best default config for the web profiles. # Solution Add support for `--config` argument for `bevy build` and `bevy run`, analogue to the `cargo` counterpart. This essentially allows you to modify the `Cargo.toml` without editing the file, e.g. `--config "profile.web.debug=false"`. We already exploit `cargo`'s `--config` arg to configure our default web compilation profiles. So we have to ensure that the user-provided args _overwrite_ our default ones. To do this, we change the default web profiles to be prepended to the user-provided `--config` args, instead of converting them to `--config` arguments directly. Since `--config` is resolved left-to-right, the defaults will be overwritten by the user. # Testing Try for example: ``` bevy build --config "profile.web.debug=false" --config 'profile.web.inherits= "release"' web ``` Now instead of ``` Finished `web` profile [unoptimized + debuginfo] target(s) ``` you should get ``` Finished `web` profile [optimized] target(s) ``` Debug info removed and optimizations enabled! (Of course this can be done easier via `bevy build --release web`, but like this it's easier to benchmark different compilation profiles to choose the best default)
- Loading branch information
1 parent
12635b7
commit 10d0dbc
Showing
9 changed files
with
111 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters