Idiomatic way to share structs and traits inside workspace

I have a workspace with multiple packages like:

workspace
├── foo
├── bar
├── message_broker
├── high_level_structs_and_traits

The high_level_structs_and_traits package, as its name indicates contains structs and traits that are used by the other packages. Both foo and bar depends on the message_broker and high_level_structs_and_traits, while message_brokerdepends onhigh_level_structs_and_traits`.

The question is then, is the aforementioned layout a good practice? Or is the a better way to share structs and traits among multiple packages in a workspace?

Having a -types package is a common pattern.

1 Like

Thanks for letting me know!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.