|
|
|
|
|
by afiori
2242 days ago
|
|
the point would be that the standard library should be forward compatible while crates should be backward compatible. so that current crates work with old version of compilers/toolchains. this applies here as each new Unicode standard requires an update of the Unicode crate. ideally the best case would be to make it so that in 20 years Rust 1.0 can still use the most updated version of Unicode fragmentation. similarly to how some C libraries insist on C89 compatibility to still work on older systems. I guess Rust would like it if this never became indispensable but also should be possible |
|
Adding unicode segmentation to the standard library and making all Rust binaries, most of which don't do unicode segmentaiton, 20 Mb larger by unnecessarily bundling the unicode tables, makes no sense.
As you see in the other thread, the problem the parent poster has is that their organizaiton doesn't let them use crates from crates.io.
That's a stupid policy for a language like Rust, and the solution isn't "move all crates of crates.io into the standard library". The solution there is for them to write their own unicode-segmentation code (and async executor, and http stack, and linear algebra, and... the whole world), since that is what their organization wants them to do. That's a stupid policy, but it is their own stupid fault.
Most organizations either allow using crates from crates.io, or have a vetting policy, where you just submit a 1 liner email saying "I need to do unicode-segmentation and there is only one library for that that's used by Firefox here: ...". Somebody then checks licenses and stuff, and gives you approval in a couple of days. If their organization doesn't have such processes, then i'm sorry for them, but I don't see how this is in any way the standard library fault.
Whatever their reasons are "my org doesn't allow us to use cargo" isn't a good reason to move something into the standard library.