aboutsummaryrefslogtreecommitdiff
path: root/rand/rand_pcg
diff options
context:
space:
mode:
Diffstat (limited to 'rand/rand_pcg')
-rw-r--r--rand/rand_pcg/CHANGELOG.md5
-rw-r--r--rand/rand_pcg/Cargo.toml2
-rw-r--r--rand/rand_pcg/build.rs9
-rw-r--r--rand/rand_pcg/src/lib.rs6
-rw-r--r--rand/rand_pcg/tests/mcg128xsl64.rs2
5 files changed, 14 insertions, 10 deletions
diff --git a/rand/rand_pcg/CHANGELOG.md b/rand/rand_pcg/CHANGELOG.md
index d37408d..6f793cf 100644
--- a/rand/rand_pcg/CHANGELOG.md
+++ b/rand/rand_pcg/CHANGELOG.md
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [0.1.2] - unreleased
+- potential blocker: https://github.com/TyOverby/bincode/issues/250
+- make `bincode` a dev-dependency again
+- clean up tests and Serde support
+
## [0.1.1] - 2018-10-04
- make `bincode` an explicit dependency when using Serde
diff --git a/rand/rand_pcg/Cargo.toml b/rand/rand_pcg/Cargo.toml
index c8a29fc..c2fcb7d 100644
--- a/rand/rand_pcg/Cargo.toml
+++ b/rand/rand_pcg/Cargo.toml
@@ -34,4 +34,4 @@ serde_derive = { version = "^1.0.38", optional = true }
bincode = { version = "1", features = ["i128"] }
[build-dependencies]
-rustc_version = "0.2"
+autocfg = "0.1"
diff --git a/rand/rand_pcg/build.rs b/rand/rand_pcg/build.rs
index cb3ae20..06e12a4 100644
--- a/rand/rand_pcg/build.rs
+++ b/rand/rand_pcg/build.rs
@@ -1,8 +1,7 @@
-extern crate rustc_version;
-use rustc_version::{version, Version};
+extern crate autocfg;
fn main() {
- if version().unwrap() >= Version::parse("1.26.0").unwrap() {
- println!("cargo:rustc-cfg=rust_1_26");
- }
+ println!("cargo:rerun-if-changed=build.rs");
+ let ac = autocfg::new();
+ ac.emit_rustc_version(1, 26);
}
diff --git a/rand/rand_pcg/src/lib.rs b/rand/rand_pcg/src/lib.rs
index 5160e87..9648e85 100644
--- a/rand/rand_pcg/src/lib.rs
+++ b/rand/rand_pcg/src/lib.rs
@@ -36,13 +36,13 @@
#![no_std]
-extern crate rand_core;
+pub extern crate rand_core;
#[cfg(feature="serde1")] extern crate serde;
#[cfg(feature="serde1")] #[macro_use] extern crate serde_derive;
mod pcg64;
-#[cfg(rust_1_26)] mod pcg128;
+#[cfg(all(rustc_1_26, not(target_os = "emscripten")))] mod pcg128;
pub use self::pcg64::{Pcg32, Lcg64Xsh32};
-#[cfg(rust_1_26)] pub use self::pcg128::{Pcg64Mcg, Mcg128Xsl64};
+#[cfg(all(rustc_1_26, not(target_os = "emscripten")))] pub use self::pcg128::{Pcg64Mcg, Mcg128Xsl64};
diff --git a/rand/rand_pcg/tests/mcg128xsl64.rs b/rand/rand_pcg/tests/mcg128xsl64.rs
index 2508917..3279536 100644
--- a/rand/rand_pcg/tests/mcg128xsl64.rs
+++ b/rand/rand_pcg/tests/mcg128xsl64.rs
@@ -1,4 +1,4 @@
-#![cfg(rust_1_26)]
+#![cfg(rustc_1_26)]
extern crate rand_pcg;
extern crate rand_core;
#[cfg(all(feature="serde1", test))] extern crate bincode;