6 releases (3 breaking)

0.4.1 Aug 22, 2018
0.3.0 Aug 14, 2018
0.2.1 May 22, 2018
0.2.0 Mar 15, 2018
0.1.0 Dec 29, 2017

#1 in Cryptocurrencies

Download history 1258/week @ 2018-05-31 2109/week @ 2018-06-07 1336/week @ 2018-06-14 1451/week @ 2018-06-21 1442/week @ 2018-06-28 1700/week @ 2018-07-05 1931/week @ 2018-07-12 2100/week @ 2018-07-19 1502/week @ 2018-07-26 1665/week @ 2018-08-02 1796/week @ 2018-08-09 1700/week @ 2018-08-16 1509/week @ 2018-08-23

7,165 downloads per month
Used in 32 crates (7 directly)

MIT/Apache

37KB
1K SLoC

Uint

Description

Provides facilities to construct big unsigned integer types. Also provides commonly used U256 and U512 out of the box.

The focus on the provided big unsigned integer types is performance and cross-platform availability. Support a very similar API as the built-in primitive integer types.

Usage

In your Cargo.toml paste

uint = "0.5.0-beta"

Construct your own big unsigned integer type as follows.

// U1024 with 1024 bits consisting of 16 x 64-bit words
construct_uint!(U1024; 16);

Tests

Basic tests

cargo test --release

Basic tests + property tests

cargo test --release --features=quickcheck

Benchmark tests

cargo bench

Crate Features

  • std: Use Rust's standard library.
    • Enables byteorder/std, rustc-hex/std
    • Enabled by default.
  • common: Provide commonly used U256 and U512 big unsigned integer types.
    • Enabled by default.
  • quickcheck: Enable quickcheck-style property testing
    • Use with cargo test --release --features=quickcheck.
  • heapsize: Implement base trait of the heapsizeof crate
    • Use with cargo build --feature=heapsize.

Dependencies

~125KB