Skip to content

v0.2.0

Choose a tag to compare

@isaacholt100 isaacholt100 released this 09 Aug 13:37
· 187 commits to master since this release

v0.2.0 introduces some differences to the API of v0.1.0. In v0.1.0, the only integer types were BUint and BInt, which by default were stored as an array of u64 digits. The u8_digit feature allowed them to be stored as an array of u8 digits instead. However, as mentioned in #7, this feature was non-additive, which could have been an issue for multiple dependencies using this library further down the line. It also meant that all integers had to either store u64 or u8 digits - there couldn't be different integer types using different digit sizes.

v0.2.0 solves this issue by defining integer types that are stored as an array of either u64, u32, u16, or u8 digits. BUint and BInt are still stored as an array of u64 digits, but there is no u8_digit feature anymore. Additionally, BUintD32 is stored as an array of u32 digits, BUintD16 as an array of u16 digits, and BUintD8 as an array of u8 digits. The signed integer types BIntD32, BIntD16 and BIntD8 are defined similarly. This allows finer control of integer bit sizes while ensuring speed is not sacrificed. For information on how to choose one of these four integer types, see https://crates.io/crates/bnum/0.2.0.

What's Changed

New Contributors

Full Changelog: https://github.com/isaacholt100/bnum/commits/v0.2.0