bevy run web quickly stopped working for more complex repository setups, because it couldn't figure out which package it had to run.
This PR adds a more sophisticated detection of the binary package detection.
We first take a look at the --bin and --package args.
If they are not defined, we try to determine the package automatically with the information provided by cargo metadata. We first look for the default_run definition and otherwise check if there is only a single binary package that could be run.
You can test this with the setup in https://github.com/TimJentzsch/bevy_complex_repo.
To do that, first install the Bevy CLI on this branch with cargo install --path ., then use bevy run web or bevy run web -p cplx_demo on that repository in the app folder.
bevy run web
quickly stopped working for more complex repository setups, because it couldn't figure out which package it had to run.This PR adds a more sophisticated detection of the binary package detection. We first take a look at the
--bin
and--package
args. If they are not defined, we try to determine the package automatically with the information provided bycargo metadata
. We first look for thedefault_run
definition and otherwise check if there is only a single binary package that could be run.You can test this with the setup in https://github.com/TimJentzsch/bevy_complex_repo. To do that, first install the Bevy CLI on this branch with
cargo install --path .
, then usebevy run web
orbevy run web -p cplx_demo
on that repository in theapp
folder.