Refactoring std for ultimate portability

I would love to see a future where everyone uses rust, or at last one where it is much easier to port rust to new platforms :wink:.

Wrt.:

and

some bikshedding/idea

I think both can be done with some think like singular (module?) interfaces , basically interfaces, which have exact one implementation chosen at compiler time at any time (ignoring the "multiple versions of the same crate" case). They can't be used wrt. generics but are only meant to say (at module level?) that some think of a certain structure exists (applicable to structs, enums, modules etc. inclusive possible partial variations of them). A crate could require such a interface to be satisfied (through other crates, possible depending on this crate) or could provide a implementation satisfying.

EDIT: just to clarify singular interfaces are also not meant to be used as trait objects (they are no traits) and don't have to specify the complete public interface the implementation satisfying them has, partial is ok as long as it doesn't conflict.

And while I think such interfaces would be nice for some cases of dependency inversion in combination with platform specify code I'm not sure if I would want see usage of it outside of this cases. And both the UI case and the test harness case mentioned by @DanielKeep can be solved differently, I think.