tailhook / humantime

A parser and formatter for std::time::{SystemTime, Duration}
Apache License 2.0
283 stars 34 forks source link

(Partial) Support for no_std #20

Open gh0st42 opened 3 years ago

gh0st42 commented 3 years ago

It would be really nice to be able to use this crate or a subset of it in no_std environments.

Most parts currently imported from std:: have equivalents in core::. After a quick look, the biggest show stopper is the missing of an Error alternative in no_std environments.

Maybe parts of the crate can be left out but it would be really cool to use humantime in IoT projects.

tailhook commented 3 years ago

Sure. I have no experience with no_std, so it's hard for me to do something. But I'm willing to accept PR.

How errors usually work on no_std? Should we just omit std::error::Error impl and leave everything as is? Does no_std support Display/Debug traits?