Open ghost opened 4 years ago
If we do this I’d prefer that we split the code on logical boundaries that aren’t just Vector specific. We’ve been discussing with other Rust projects the possibility of sharing functionality, like file tailing.
If we do this I’d prefer that we split the code on logical boundaries that aren’t just Vector specific. We’ve been discussing with other Rust projects the possibility of sharing functionality, like file tailing.
I think it’s a different concern. It’ll still is a valuable thing to do though!
As a sidenote, an interesting question to explore is would Rust codegen LTO which we use for release builds work with project split into many library crates with the same efficiency as it does now.
Do we do anything special with LTO? Can you link relevant repo parts here so I can follow?
So the big danger here is that we end up spending more engineering time managing the cargo workspace than we save in build times on a monolith. :(
Cargo workspaces handle dependencies rather badly. That said, it might be an improvement over our use of features...
@LucioFranco I know you've felt a lot of pain from feature flags, do you think this might trend us towards something better?
I have a feeling that features flags will fall under the same thing as a workspace where we spend more time trying to make sure all the feature flag variations build correctly. I also feel like splitting everything into a workspace as well will be too much work.
I think for me from what I've seen is that linking is really the slow part for my workflow. I wonder if there are ways we can reducing linking. I am not sure but I would have to assume that we need to link in every dependency everytime we run test? Maybe reducing dependencies would help here?
@bruceg proposed in https://github.com/timberio/vector/pull/1924#issuecomment-591550535 to split Vector components into multiple isolated library crates, such as sinks, sources, etch to reduce built time of individual bits. This sounds interesting, although I think we need to spec out some kind of a plan before we get started.