Closed CharlyCst closed 3 weeks ago
Is the end goal to have a dev and a release profile, or to have support for building an arbitrary profile with just
?
The goal is to make it possible to choose which profile to build from the configuration file. Not to extend just build
or just run
.
While thinking about it now I think we should change for debug by default (sorry for changing my mind 😬) I expect that most of the builds will be done in debug mode (e.g. to run in the CI or during development), so that should be the default with the option to build in release mode by updating the config.
Closed with #144?
Indeed, thanks :)
As of now we only compile Miralis in debug mode.
We do enable some optimization in the debug mode profile, see: https://github.com/CharlyCst/miralis/blob/85b956e687f6c2f974e6a7cb1bb9c59b029c8d1b/Cargo.toml#L18-L20
But this is not equivalent to to compiling in release mode. In particular the core library is littered with debug asserts and checks (which is a good thing!) that gets removes in release mode. So we might observe some significant performance benefits from release builds.
To do so we should expend the configuration to enable selecting the compilation mode there. I would lean toward compiling in release mode by default, and adding a
debug
flag that default tofalse
in thedebug
table. Whendebug.debug
is true we should compile in debug mode, whendebug.debug
is false (or nor set) we should compile in release mode.Currently the runner always assumes the build is a debug build, and look for the Miralis and artifacts under the
./target/debug
folder. We will need a way to select the right folder based on the type of build.