aip | title | author | discussions-to (*optional) | Status | last-call-end-date (*optional) | type | created | updated (*optional) |
---|---|---|---|---|---|---|---|---|
24 |
Move Library Updates |
gerben-stavenga |
<a url pointing to the official discussion thread> |
Accepted |
Standard |
04/16/2023 |
04/16/2023 |
We enhanced the libraries with FixedPoint64 support, extra math functions, string formatting and extra inline functions.
To facilitate move developers with a more comprehensive standard library.
- Add FixedPoint64 as a more precise counterpart to FixedPoint32, with 18 digits precision and covering numbers between 0 and 10^18.
- Add sqrt, exp, log, log2, floor_log2, mul_div to the library as standard functions.
- Add additional inline functions for standard algorithms to the vector library. Namely for_each_reverse, rotate, partition, foldr, stable_partition and trim.
- Add upsert to simple table allowing to update existing keys or insert new key.
- Add formatting routines string_utils module. We have to_string(value) to convert a value into a human readable string and formatX(fmt, val1, val2, ..) for a rust-like string formatting.
- FixedPoint64 aptos-labs/aptos-core#7074
- Math lib aptos-labs/aptos-core#6714
- Inline functions aptos-labs/aptos-core#6882
- Upsert aptos-labs/aptos-core#6860
Devnet: Already available for testing
Testnet: ~4/24
Mainnet: May 1st