15 releases (7 breaking)

✓ Uses Rust 2018 edition

0.8.1 Aug 8, 2019
0.8.0 Jun 13, 2019
0.7.1 May 15, 2019
0.6.1 Jan 16, 2019
0.1.0 Dec 29, 2017
Download history 3704/week @ 2019-04-25 4080/week @ 2019-05-02 4776/week @ 2019-05-09 4706/week @ 2019-05-16 3799/week @ 2019-05-23 4910/week @ 2019-05-30 4329/week @ 2019-06-06 4058/week @ 2019-06-13 3364/week @ 2019-06-20 3923/week @ 2019-06-27 3892/week @ 2019-07-04 3869/week @ 2019-07-11 3310/week @ 2019-07-18 4247/week @ 2019-07-25 4077/week @ 2019-08-01

17,315 downloads per month
Used in 79 crates (15 directly)

MIT/Apache

45KB
1K SLoC

Uint

Description

Provides facilities to construct big unsigned integer types. Also provides commonly used U128, 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.8"

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

Fuzz tests

see fuzz README.md

Crate Features

  • std: Use Rust's standard library.
    • Enables byteorder/std, rustc-hex/std
    • Enabled by default.
  • common: Provide commonly used U128, U256 and U512 big unsigned integer types.
    • Enabled by default.
  • quickcheck: Enable quickcheck-style property testing
    • Use with cargo test --release --features=quickcheck.

Dependencies

~120KB