Merge branch 'uint'

This commit is contained in:
debris 2016-11-23 01:20:04 +01:00
commit bcf09357c5
5 changed files with 1587 additions and 0 deletions

1
Cargo.lock generated
View File

@ -495,6 +495,7 @@ version = "0.1.0"
dependencies = [
"heapsize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.21 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]

View File

@ -2,7 +2,11 @@
name = "primitives"
version = "0.1.0"
authors = ["debris <marek.kotewicz@gmail.com>"]
build = "build.rs"
[dependencies]
heapsize = "0.3"
rustc-serialize = "0.3"
[build-dependencies]
rustc_version = "0.1"

25
primitives/build.rs Normal file
View File

@ -0,0 +1,25 @@
// Copyright 2015, 2016 Ethcore (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
extern crate rustc_version;
use rustc_version::{version_meta, Channel};
fn main() {
if let Channel::Nightly = version_meta().channel {
println!("cargo:rustc-cfg=asm_available");
}
}

View File

@ -1,7 +1,14 @@
#![cfg_attr(asm_available, feature(asm))]
extern crate rustc_serialize;
#[macro_use] extern crate heapsize;
pub mod bytes;
pub mod hash;
pub mod uint;
pub use rustc_serialize::hex;
pub use uint::U256;
pub use hash::{H160, H256};
pub use bytes::Bytes;

1550
primitives/src/uint.rs Normal file

File diff suppressed because it is too large Load Diff