I have this situation where my project is separated in crates using a workspace.
[workspace] members = [ "main_app", // binary app "resource_packer" // binary app ]
My goal is to use
resource_packer as a helper application to package assets to my main binary program
resource_packer loads files from disk, processes them and saves them back to disk.
main_app has a
build.rs where I am trying to build a script that would check if the assets that
resource_packer is supposed to process have changed, and if they have, the
build.rs script should re-run the
resource_packer binary and collect its generated files to the disposal of
build.rs I am trying to use this command:
Command::new("cargo run --bin resource_packer").spawn().expect("Failed to run asset packer").wait();
but I get an error
error: failed to run custom build command for.... Why is that? How can I run a binary crate of a workspace inside another binary crate's