3 ms·
The reason Rust has a lean std is because it must be backwards compatible, and already there are some deprecated things in std that must nevertheless be support
by satvikpendem 4y ago
The reason Rust has a lean std is because it must be backwards compatible, and already there are some deprecated things in std that must nevertheless be supported forever. With community crates, they can have breaking changes and can generally innovate more than those in std.
- estebank 4y agoAn alternative I'm not against is having the concept of "crate distros", where a bunch of related crates can be pulled in in one go with a tested set of versions. Something that delivers an experience like Django or Rails. At that point the distinction of "std" and these packages is one of nomenclature (and the kept ability to evolve independently from the compiler release schedule and remove things in the later).
- n_kr 4y agoThat would be a great thing to have, but I can't imagine how that can be maintained. Managing versions of gdal+gdal-sys+geo+ndarray+ndarray-linalg has been a giant PITA recently so I for one would welcome this feature.
- jamincan 4y agoIt's not exactly what you are talking about, but tokio is kind of doing this - hyper, tonic, tower, tracing etc. and then all packaged together in axum.
- chlorion 4y agoThis seems like a self imposed limit rather than something fundamental. I am not sure why people get so hung up on the stdlib's stability guarantees. We could have a second unstable "nonstandard" library for example, and eliminate this "issue" completely. Even a crate "distro" like the other user said would be nice. Something to allow us to establish some level of trust over what we are using. Right now we have people mindlessly adding 100s of crates with no concern about the supply chain.
- steveklabnik 4y agoI’m the space Rust is in, people care about stability to the extreme. So some of it is self imposed, sure, but that self imposition is an understanding of what constraints the intended audience has. Heck you can see it in this very thread with a complaint about too many new things even though they’re compatible!
- chlorion 4y agoI am not sure that something like a crate distro would actually cause a decrease in stability overall, at the end of the day people are still going to be using the same crates and those crates will be as stable as before, but it will be easier to figure out which ones are trustworthy for a person who isn't super deep into the rust ecosystem and whatnot! I am thinking of nom for example, lots of people are already using nom and are comfortable with it's current level of stability, so if it was part of a crate distro people would just determine if nom was stable enough for them and use it, otherwise find something else. I do appreciate that the real standard library and core language are stable though just to be clear. I also appreciate that the stdlib tries to stay somewhat lean rather than shoving the whole world in it. I am just a random hobby rust user so it's very possible I am talking a bunch of nonsense! Also thanks for replying, it's always cool to see you active in these threads :)