Merge pull request #14 from rphmeier/uint-asm-with-feature
Uint ASM only with feature
This commit is contained in:
commit
c43a3bfed9
|
@ -1,2 +1,2 @@
|
||||||
[workspace]
|
[workspace]
|
||||||
members = ["uint", "fixed-hash", "ethereum-types", "tests", "ethbloom"]
|
members = ["uint", "fixed-hash", "ethereum-types", "tests", "ethbloom"]
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "ethbloom"
|
name = "ethbloom"
|
||||||
version = "0.4.0"
|
version = "0.4.1"
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
description = "Ethereum bloom filter"
|
description = "Ethereum bloom filter"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
@ -28,8 +28,6 @@
|
||||||
|
|
||||||
#![cfg_attr(not(feature="std"), no_std)]
|
#![cfg_attr(not(feature="std"), no_std)]
|
||||||
|
|
||||||
#![cfg_attr(asm_available, feature(asm))]
|
|
||||||
|
|
||||||
#[cfg(feature="std")]
|
#[cfg(feature="std")]
|
||||||
extern crate core;
|
extern crate core;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
[package]
|
[package]
|
||||||
name = "ethereum-types"
|
name = "ethereum-types"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
homepage = "https://github.com/paritytech/primitives"
|
homepage = "https://github.com/paritytech/primitives"
|
||||||
description = "Ethereum types"
|
description = "Ethereum types"
|
||||||
|
build = "build.rs"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
rustc_version = "0.2"
|
rustc_version = "0.2"
|
||||||
|
@ -22,3 +23,4 @@ default = ["std", "heapsizeof", "serialize"]
|
||||||
std = ["uint/std", "fixed-hash/std", "ethbloom/std"]
|
std = ["uint/std", "fixed-hash/std", "ethbloom/std"]
|
||||||
heapsizeof = ["uint/heapsizeof", "fixed-hash/heapsizeof", "ethbloom/heapsizeof"]
|
heapsizeof = ["uint/heapsizeof", "fixed-hash/heapsizeof", "ethbloom/heapsizeof"]
|
||||||
serialize = ["std", "ethereum-types-serialize", "serde", "ethbloom/serialize"]
|
serialize = ["std", "ethereum-types-serialize", "serde", "ethbloom/serialize"]
|
||||||
|
use_asm = ["uint/use_asm"]
|
|
@ -11,7 +11,9 @@ extern crate rustc_version;
|
||||||
use rustc_version::{version_meta, Channel};
|
use rustc_version::{version_meta, Channel};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
if let Channel::Nightly = version_meta().unwrap().channel {
|
if cfg!(feature = "use_asm") {
|
||||||
println!("cargo:rustc-cfg=asm_available");
|
if let Channel::Nightly = version_meta().unwrap().channel {
|
||||||
|
println!("cargo:rustc-cfg=asm_available");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,4 +28,4 @@ pub use fixed_hash::clean_0x;
|
||||||
pub type Address = H160;
|
pub type Address = H160;
|
||||||
pub type Secret = H256;
|
pub type Secret = H256;
|
||||||
pub type Public = H512;
|
pub type Public = H512;
|
||||||
pub type Signature = H520;
|
pub type Signature = H520;
|
|
@ -11,3 +11,6 @@ crunchy = "0.1.5"
|
||||||
ethereum-types = { path ="../ethereum-types", features = ["std", "heapsizeof"] }
|
ethereum-types = { path ="../ethereum-types", features = ["std", "heapsizeof"] }
|
||||||
quickcheck = "0.6"
|
quickcheck = "0.6"
|
||||||
uint = { path = "../uint" }
|
uint = { path = "../uint" }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
use_asm = ["uint/use_asm", "ethereum-types/use_asm"]
|
|
@ -1,17 +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 let Channel::Nightly = version_meta().unwrap().channel {
|
|
||||||
println!("cargo:rustc-cfg=asm_available");
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +1,3 @@
|
||||||
#![cfg_attr(asm_available, feature(asm))]
|
|
||||||
|
|
||||||
extern crate core;
|
extern crate core;
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
@ -13,4 +11,4 @@ extern crate crunchy;
|
||||||
extern crate quickcheck;
|
extern crate quickcheck;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
pub mod uint_tests;
|
pub mod uint_tests;
|
|
@ -4,7 +4,7 @@ homepage = "http://parity.io"
|
||||||
repository = "https://github.com/paritytech/primitives"
|
repository = "https://github.com/paritytech/primitives"
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
name = "uint"
|
name = "uint"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ crunchy = "0.1.5"
|
||||||
[features]
|
[features]
|
||||||
std = ["rustc-hex"]
|
std = ["rustc-hex"]
|
||||||
heapsizeof = ["heapsize"]
|
heapsizeof = ["heapsize"]
|
||||||
|
use_asm = []
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "modular"
|
name = "modular"
|
||||||
|
|
|
@ -11,7 +11,9 @@ extern crate rustc_version;
|
||||||
use rustc_version::{version_meta, Channel};
|
use rustc_version::{version_meta, Channel};
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
if let Channel::Nightly = version_meta().unwrap().channel {
|
if cfg!(feature = "use_asm") {
|
||||||
println!("cargo:rustc-cfg=asm_available");
|
if let Channel::Nightly = version_meta().unwrap().channel {
|
||||||
|
println!("cargo:rustc-cfg=asm_available");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue