The challenges listed in What do you think about publishing `libstd` on crates.io? boil down to two things, neither of which are a big impediment for this:
-
Foreign deps. Thankfully, the IDEs don’t need to show the definitions of foreign definitions. So use the sysroot for the native libs—use rustup or whatever to get those—and then plain ole’ Cargo should be able to do the rest. Since rustc already will already happily find
compiler-rt
in the sysroot, I assume it will find the other native libs too today. Even if that is not true, it shouldn’t be much work to make it find them tomorrow. -
Stable compilers. This is an artificial restriction, we just need to pick a backdoor to allow stable compilers to build just the stdlib but not other unstable code. Since there is exactly one 1 official stdlib per (stable) compiler this isn’t too difficult. Hardcode some hashes; add a
#[trust_me_I_am_stdlib_I_will_be_maintained_forever]
attribute—I don’t care. They all work.
I believe they’re fairly easy to the point where I am happy to work on these things to make them happen and prove it.