/
View dependency graph
Depends on
- dh-cargo (dh-sequence-cargo)
- rust-arbitrary (librust-arbitrary-1+default-dev)
- rust-byteorder (librust-byteorder-1+std-dev, librust-byteorder-1-dev)
- rust-crunchy (librust-crunchy-0.2+std-dev, librust-crunchy-0.2-dev)
- rust-hex (librust-hex-0.4+std-dev, librust-hex-0.4-dev)
- rust-quickcheck (librust-quickcheck-1+default-dev)
- rust-static-assertions (librust-static-assertions-1+default-dev)
- cargo, debhelper-compat, libstd-rust-dev, rustc
README (full)
Uint
Description
Provides facilities to construct big unsigned integer types which use no allocations (stack-based, fixed bit length).
If you want to use a predefined U128, U256 or U512 type, take a look at the primitive-types or ethereum-types crate.
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"
Import the macro
use uint::construct_uint;
If you're using pre-edition Rust in your main file
#[macro_use]
extern crate uint;
Construct your own big unsigned integer type as follows.
// U1024 with 1024 bits consisting of 16 x 64-bit words
construct_uint! {
pub struct 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.
- Enables
quickcheck: Enable quickcheck-style property testing- Use with
cargo test --release --features=quickcheck.
- Use with
arbitrary: Allow for creation of anuintobject from random unstructured input for use with fuzzers that use thearbitrarycrate.- Disabled by default.
| dir | benches/ |
| dir | debian/ |
| dir | examples/ |
| dir | src/ |
| dir | tests/ |
| file | .cargo_vcs_info.json |
| file | CHANGELOG.md |
| file | Cargo.lock |
| file | Cargo.toml |
| file | Cargo.toml.orig |
| file | README.md |