bitcode icon indicating copy to clipboard operation
bitcode copied to clipboard

Support for `time`

Open vnghia opened this issue 1 year ago • 6 comments

Hi, could you consider support for time crate ? I can send a PR if this FR is accepted. Thank you!

  • [x] time::Time
  • [ ] time::Duration
  • [ ] time::Date

vnghia avatar Sep 12 '24 11:09 vnghia

Thanks for the suggestion; we would consider a PR. I think the validation will be relatively challenging (like std::time::Duration but more than one check).

finnbear avatar Sep 12 '24 20:09 finnbear

@finnbear Hi, could you also consider adding support for chrono?

l-7-l avatar Sep 19 '24 21:09 l-7-l

We would probably treat chrono equally, since it is similar in features and popularity.

Another library to consider is jiff.

finnbear avatar Sep 19 '24 21:09 finnbear

@finnbear Wow, thanks! By the way, if there are plans to add support for rust-decimal, I’ve already submitted a PR. I’m also looking forward to the addition of support for geo-types.

Have a great day!

l-7-l avatar Sep 19 '24 21:09 l-7-l

if there are plans to add support for rust-decimal

The process for supporting library X is:

  1. if the library doesn't have a precedent for supporting niche encoding crates, skip to step 5
  2. if #[derive(Encode, Decode)] is bad for size, speed, or security, skip to step 5
  3. submit a PR to X with #[derive(Encode, Decode)]
  4. if the PR is accepted, you're done! otherwise, continue to step 5
  5. submit a PR to bitcode
  6. we (usually @caibear) attempt to optimize it
  7. we might merge it into bitcode

As per this, I'd probably skip to step 5 for rust_decimal

finnbear avatar Sep 19 '24 21:09 finnbear

@finnbear Thank you, I almost made a mistake, haha. I will close the PR I submitted to rust-decimal.

l-7-l avatar Sep 19 '24 22:09 l-7-l