Go to file
snd 8a14926f6d Issue 6 (#7)
* add rustc_version to build deps of ether types (needed by build script)

* ethereum-types: add build script that sets cargo:rustc-cfg=asm_available on nightly

* ethereum-types: #![cfg_attr(asm_available, feature(asm))]

* tests: add the whole feature asm build script to make it pass on nightly CI

* add #![cfg_attr(asm_available, feature(asm))] directly where needed

so users don't have to add it

* remove tests/build.rs since it should not be needed anymore

* move inner cfg_attr attributes to the right allowed position

* remove check for asm_available in contexts that already have check for that
2017-12-05 13:14:16 +01:00
benches Fix warnings 2017-08-22 15:18:33 +02:00
ethereum-types Issue 6 (#7) 2017-12-05 13:14:16 +01:00
fixed-hash unify hash macro by renaming it to `construct_hash` 2017-11-14 15:38:09 +01:00
tests ethereum-types refactor 2017-10-30 10:00:58 -07:00
uint Issue 6 (#7) 2017-12-05 13:14:16 +01:00
.gitignore mul and from optimizations 2017-08-17 17:25:00 +02:00
.travis.yml run tests in release mode 2017-11-14 16:57:32 +01:00
Cargo.toml ethereum-types refactor 2017-10-30 10:00:58 -07:00
LICENSE-APACHE relicense under mit/apache2 2017-05-11 15:25:52 +02:00
LICENSE-MIT relicense under mit/apache2 2017-05-11 15:25:52 +02:00
README.md fixed cargo snippet in README.md 2017-11-03 10:41:41 -05:00

README.md

bigint

Build Status

Fixed-sized integers arithmetic

To specify a dependency, add to Cargo.toml

[dependencies]
ethereum-types = "0.1"

Little example

extern crate ethereum_types;
use ethereum_types::U256;

fn main() {
	let mut val: U256 = 1023.into();
	for _ in 0..200 { val = val * 2.into() }
	assert_eq!(
		&format!("{}", val), 
		"1643897619276947051879427220465009342380213662639797070513307648"
	);
}

no_std crates

This crate has a feature, std, that is enabled by default. To use this crate in a no_std context, add the following to your Cargo.toml:

[dependencies]
ethereum-types = { version = "4", default-features = false }