I have one Rust project that compiles to 2 different binary files (one is a CLI and one is a GUI app). The GUI app requires dependencies on tauri but the CLI does not. How should I declare the Cargo.toml to achieve that? Thanks
A part of the Cargo.toml
[[bin]]
name = "app"
path = "src/main.rs"
[[bin]]
name = "cli"
path = "src/cli.rs"
[dependencies]
// The stuff here are shared between both binaries
AFAIK, in a workspace cargo will manage both dependencies in a shared Cargo.lock, won't it?
I ask because I have the exact same problem: I have a server that I need to split in two: the Mainstream one, which contains all APIs and is open to cargo update and change, and the Secure one, which I want to deploy new versions with the guarantee that nothing was touched (even dependencies) except things we needed to touch.
What would be the best way to achieve that?