I have a Rust project with two executables:
src
└── bin
├── app.rs
└── tool.rs
The tool
program is run as a subprocess of app
. (The separation is needed because tool
is run with different permissions than app
.)
To run app
I need to first ensure that tool
has been built, so I currently do something like this:
cargo build && cargo run --bin app
Ideally I would be able to add something to my Cargo.toml
so that it knows that app
depends on tool
being built so that I could just run this:
cargo run --bin app
Is there a way to do this?