Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Defining an error type that is meaningful, portable, and compatible with no-std isn't straightforward. If the std lib's getrandom requires std, then just like that, rand and many other crates won't use it anyway. Using io::Result seems to me to face this challenge.
Time in libstd is a great example of why exposing resources carelessly in libstd is a problem. Between SystemTime and Instant a choice is presented between "wall clock, but not monotonic" and "arbitrary, but monotonic". But then the first progresses while the computer is asleep and the 2nd doesn’t …depending where the code runs. And some people do expect it to or assumed it would, it turns out. So now the options are adding SystemTimeButDoesn’tTickDuringSleep and InstantButTicksDuringSleep, changing the behaviour of one of them breaking users documenting it in big letters and somebody will miss that anyway, or maybe something else.