New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: put everything in one big Cargo workspace #18
Conversation
Currently, this repo contains three separate Cargo workspaces: one for `source/`, which contains the actual mnemOS crates, and then a separate root workspace for each crate in `tools/`. This is a bit unfortunate, as it means that it's not possible to run `cargo run --bin WHATEVER` from the root directory of the repo. Instead, in order to run `melpomene`, it's necessary to `cd` into `source`. Similarly, if I want to run tools like `crowtty`, I need to `cd` into `tools/crowtty`. This is very mildly annoying. The lack of a global workspace also means that it's not currently possible to run cargo commands like `cargo build --workspace` and build everything in one go. This branch rectifies this by moving the workspace's `Cargo.toml` to the root of the repo, and including all crates in the workspace (both `source/` and `tools`/). The potential downside of this is that it means there's a lockfile, `Cargo.toml`, and `.cargo/` directory in the root of the workspace, which previously was nice and clean, and didn't have a bunch of random config files and stuff in it. But, I think this is probably not *that* bad? If you'd really prefer not to make this change, that's fine --- having to change dirs was really only a minor inconvenience.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only concern with this is that I have some memory of workspaces for multiple targets (e.g. desktop linux + cortex-m) not working right/being a pain in the ass.
I can't remember if it was cargo or rust-analyzer's fault, but the original division of workspaces was made to avoid "embedded" crates and "desktop crates" being in the same workspace.
That being said - in this consideration melpo should probably be in the "tools" folder.
I'm happy to merge this now, but it might make sense to back out later when we get closer to working with real hardware.
Ah, hmm, I was wondering if there was some issue like that. I've not had problems with having all the If this causes problems, we can definitely undo it later. |
This branch adds `cargo melpomene` and `cargo melpo` aliases for running Melpomene that are equivalent to `cargo run --bin melpomene -- <ARGS>` but with slightly fewer characters. This is very minor but I thought maybe nice to have. Depends on #18
This branch adds `cargo melpomene` and `cargo melpo` aliases for running Melpomene that are equivalent to `cargo run --bin melpomene -- <ARGS>` but with slightly fewer characters. This is very minor but I thought maybe nice to have. Depends on #18
This branch adds `cargo melpomene` and `cargo melpo` aliases for running Melpomene that are equivalent to `cargo run --bin melpomene -- <ARGS>` but with slightly fewer characters. This is very minor but I thought maybe nice to have. Depends on #18
Currently, this repo contains three separate Cargo workspaces: one for
source/
, which contains the actual mnemOS crates, and then a separateroot workspace for each crate in
tools/
.This is a bit unfortunate, as it means that it's not possible to run
cargo run --bin WHATEVER
from the root directory of the repo. Instead,in order to run
melpomene
, it's necessary tocd
intosource
.Similarly, if I want to run tools like
crowtty
, I need tocd
intotools/crowtty
. This is very mildly annoying. The lack of a globalworkspace also means that it's not currently possible to run cargo
commands like
cargo build --workspace
and build everything in one go.This branch rectifies this by moving the workspace's
Cargo.toml
to theroot of the repo, and including all crates in the workspace (both
source/
andtools
/). The potential downside of this is that it meansthere's a lockfile,
Cargo.toml
, and.cargo/
directory in the root ofthe workspace, which previously was nice and clean, and didn't have a
bunch of random config files and stuff in it. But, I think this is
probably not that bad?
If you'd really prefer not to make this change, that's fine --- having
to change dirs was really only a minor inconvenience.