You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RustDDS is current one BIG crate. This means that when projects rely on RustDDS they must build all the code in one big step. You can increase parallelism of cargo's build, potentially give library users more fine grain access to functionality, and the purpose of dependencies much more clear.
You would start by replacing the root Cargo.toml with a workspace definition. All the nested crates (I call them subcrates but I don't think that's a popular term) can continue to exist in this repo no problem.
How could you "chunk" up the RustDDS?
/
Cargo.toml # the workspace one
/rustdds-serialization/Cargo.toml
/rustdds-messages/Cargo.toml
/rustdds-network/Cargo.toml
... and so on ...
[package]
name = "rustdds-serialization
version = "0.1.0"
authors = ["..."]
edition = "2021"
[dependencies]
# only the SPECIFIC dependencies for the serialization functionality
and cargo can roll up all the transitive dependencies of your subcrates and create a Cargo.lock at the root.
All my rust projects have transitioned to this style, it makes builds much faster and small crates have nice little test suites.
The text was updated successfully, but these errors were encountered:
However, before doing this, the RustDDS codebase needs to be reviewed and quite likely some code should be moved between current modules to make a more sensible module structure. Otherwise, the dependencies between subcrates could end up very convoluted.
RustDDS is current one BIG crate. This means that when projects rely on RustDDS they must build all the code in one big step. You can increase parallelism of cargo's build, potentially give library users more fine grain access to functionality, and the purpose of dependencies much more clear.
You would start by replacing the root
Cargo.toml
with a workspace definition. All the nested crates (I call them subcrates but I don't think that's a popular term) can continue to exist in this repo no problem.How could you "chunk" up the RustDDS?
then in the root Cargo.toml:
and
rustdds-serialization/Cargo.toml
:and cargo can roll up all the transitive dependencies of your subcrates and create a
Cargo.lock
at the root.All my rust projects have transitioned to this style, it makes builds much faster and small crates have nice little test suites.
The text was updated successfully, but these errors were encountered: