unicode-org / icu4x

Solving i18n for client-side and resource-constrained environments.
https://icu4x.unicode.org
Other
1.33k stars 174 forks source link

Units Conversion for ICU4X #3577

Open younies opened 1 year ago

younies commented 1 year ago

Units Conversion library is important for locale aware units conversion formatting and for number formatter too. There are couple of units conversion libraries in crate.io such as

Shall we have our own implementation, or shall we adopt one of them.

sffc commented 1 year ago

There are some others that appear more active:

https://github.com/iliekturtles/uom https://github.com/tiffany352/rink-rs https://github.com/paholg/dimensioned https://github.com/itt-ustutt/quantity https://github.com/DrPlantabyte/simple-si-units

I'm just suggesting that we try to fit in well with the Rust ecosystem. Maybe it turns out that our use cases are unique enough that we write all the code ourselves, but we should investigate the ecosystem before committing to writing and maintaining such a code base.

sffc commented 1 year ago

Discuss with:

sffc commented 1 year ago

One thing to investigate is whether any of the existing libraries could serve as basically an engine where we can inject our own data. Like, if we provide the conversion factors, and there's a library that does the algebra, that would still be a big win.

younies commented 1 year ago

@sffc , we want to avoid writing our own algebra.

@younies , I think writing the algebra is not that hard, and I think it is important to control the precision too.

robertbastian commented 6 months ago

Are we still discussing this? It looks like we're building our own?