Multiple projects in the same Cargo workspace
# help
o
I have a Cargo workspace with the following structure:
Copy code
.
├── Cargo.toml # workspace manifest
├── crates
│   └── crate1
└── crate2
crate1
and
crate2
have other names in reality, and there are also more crates in
crates/
but they are either unrelated. I tried to initialize 2 different projects in this workspace. 1 in either crate.
Copy code
sh
cd crates/crate1
# it would use my git repo's name by default for some reason
cargo shuttle project start --name <crate-name>
When going into either folder and running
cargo shuttle run
, both projects would start up, which is kind of confusing. I tried forcing a single project via the
--name
and
--working-directory
flags on
cargo shuttle run
but neither changed anything. Is this intended? Either way, is there a way to manage the projects separately while they live in the same workspace?
After some more testing it seems to only start one of the two when deploying... 🤔 I can't control which one it is either
a
are both of your crates members of the top level cargo toml workspace?
o
Well there is only one workspace, so yes
the top level
Cargo.toml
has both listed as members
they are both binary crates though and I would like to deploy them separately
a
It might be better to not have both of them in the workspace at the same time for now - i'll log the bug as a gh issue for you
o
they both have dependencies on other workspace members, do I just duplicate everything then?
a
Hmmmm, I would hold off for now. There might be someone who has a better answer than what I have
o
alright