optimization-engine icon indicating copy to clipboard operation
optimization-engine copied to clipboard

Consider swapping to web-time from instant

Open AndrewJSchoen opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. wasm-bindgen 0.2.86 effectively breaks the stdweb library, which is a pretty old library that is an optional dependency of instant. While instant still currently works, as long as that stdweb feature isn't enabled, it hasn't seen updates in a while and apparently has 2 critical issues, according to a long discussion post in the rust discord.

Describe the solution you'd like Apparently, however, a new library meant as a drop-in replacement to instant now exists, called web-time (github), which aims to have greater similarity with sys::time. I have tried it in one of my projects, and it seems to work just fine. Like instant, it reverts to using sys::time if not in the browser.

Describe alternatives you've considered The main option would be to continue using instant, being aware that the stdweb feature shouldn't be enabled.

Additional context Github issue with stdweb and wasm-bindgen

AndrewJSchoen avatar Jun 07 '23 23:06 AndrewJSchoen