Is it possible to have a circular dependency in rust workspaces when crates are not usable by themselves?
the problem with circular dependencies is that you can’t build one as it needs the other
but I don’t care to have a single target that is built all at once like it was a single project
Why use workspaces in the first place?
Let’s say I have this structure:
- crates:
- storage:
- hash_table
- b_tree
- buffer_pool
- catalog
Visibility:
I want to mark some function visibility to be inside that crate (e.g. only inside b_tree) I need to do pub(in crate::storage:b_tree)
everywhere (having 2 layers is ok but what about 4?)
Imports:
I want to use some function from other “crate” it will require me to have the full structure crate::storage::b_tree
or have to propagate the use up the tree
5