build script and feature cleanup

This commit is contained in:
Robert Habermeier 2018-01-31 22:08:38 +01:00
parent 2e10eb3e76
commit 18e2f90688
5 changed files with 4 additions and 24 deletions

View File

@ -1,2 +1,2 @@
[workspace]
members = ["uint", "fixed-hash", "ethereum-types", "tests", "ethbloom"]
members = ["uint", "fixed-hash", "ethereum-types", "tests", "ethbloom"]

View File

@ -5,6 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
license = "MIT"
homepage = "https://github.com/paritytech/primitives"
description = "Ethereum types"
build = "build.rs"
[build-dependencies]
rustc_version = "0.2"

View File

@ -28,4 +28,4 @@ pub use fixed_hash::clean_0x;
pub type Address = H160;
pub type Secret = H256;
pub type Public = H512;
pub type Signature = H520;
pub type Signature = H520;

View File

@ -1,19 +0,0 @@
// Copyright 2015-2017 Parity Technologies
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
extern crate rustc_version;
use rustc_version::{version_meta, Channel};
fn main() {
if cfg!(feature = "use_asm") {
if let Channel::Nightly = version_meta().unwrap().channel {
println!("cargo:rustc-cfg=asm_available");
}
}
}

View File

@ -1,5 +1,3 @@
#![cfg_attr(asm_available, feature(asm))]
extern crate core;
#[cfg(test)]
#[macro_use]
@ -13,4 +11,4 @@ extern crate crunchy;
extern crate quickcheck;
#[cfg(test)]
pub mod uint_tests;
pub mod uint_tests;