-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Context: nushell/nushell#10097 (comment)
uucore is quite modular in that large parts can be enabled or disabled via features. However, this does go far enough yet. There are many modules in the mods folder, that should be put behind feature flags.
This would make it so that uucore becomes smaller and faster to compile when only compiling a subset of utils. This is of particular interest for nushell, where we are introducing just a single util (cp), but have to include the entirety of uucore.
Fixing this should not be too hard. However, we should pay special attention to verify that every util still compiles on its own. That is, that they individually enable all the features they need. Every util should compile like this:
cargo build --no-default-features --features {util}
Ideally, we would also test this in the CI. See also #4032
PS: Ultimately, I think uucore should be split into multiple crates, but that's an issue for another time. If we make it more modular now, we can also more easily split it up in the future.