I plan to implement my project as a bunch of crates. Let's say each crate consist of graphics filters of a similar functionality, say:
- sharpen
- pseudo3d
and others. The rationale behind such a split is that user now can install only these filters they need. Each of thee crates however requires some traits that define common behavior, e.g:
pub trait GpraphicFilter {}
So what is the idiomatic way to provide these traits and structs that will be shared between all the crates? Should I put them into another crate, say filter_base
, filter_def
, etc and them import that crate in all others?