Skip to content

Commit

Permalink
Merge pull request #619 from dhardy/core-0.2
Browse files Browse the repository at this point in the history
rand_core 0.2.2: a compatibility shim around 0.3
  • Loading branch information
dhardy committed Oct 3, 2018
2 parents 7f00a4b + bd225a7 commit 8648fec
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 385 deletions.
15 changes: 8 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,27 @@ sudo: false
# - pinned stable, latest stable, beta and nightly Rust releases
# - Linux, OS X, Android, iOS, bare metal (i.e. no_std)
# - x86_64, ARMv7, a Big-Endian arch (MIPS)
# HACK: use --tests to disable doc-tests for rand_core 0.2 (see #619)
matrix:
include:
- rust: 1.22.0
install:
script:
- cargo test --tests --no-default-features
- cargo test --package rand_core --no-default-features
- cargo test --package rand_core:0.2.2 --no-default-features --tests
- cargo test --features serde1,log
- rust: stable
os: osx
install:
script:
- cargo test --tests --no-default-features
- cargo test --package rand_core --no-default-features
- cargo test --package rand_core:0.2.2 --no-default-features --tests
- cargo test --features serde1,log
- rust: beta
install:
script:
- cargo test --tests --no-default-features
- cargo test --package rand_core --no-default-features
- cargo test --package rand_core:0.2.2 --no-default-features --tests
- cargo test --features serde1,log
- rust: nightly
install:
Expand All @@ -34,13 +35,13 @@ matrix:
- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
script:
- cargo test --tests --no-default-features --features=alloc
- cargo test --package rand_core --no-default-features --features=alloc,serde1
- cargo test --package rand_core:0.2.2 --no-default-features --features=alloc,serde1 --tests
- cargo test --features serde1,log,nightly,alloc
- cargo test --all --benches
# remove cached documentation, otherwise files from previous PRs can get included
- rm -rf target/doc
- cargo doc --no-deps --all --all-features
- cargo deadlinks --dir target/doc
#- rm -rf target/doc
#- cargo doc --no-deps --all --all-features
#- cargo deadlinks --dir target/doc
after_success:
- travis-cargo --only nightly doc-upload

Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ install:
build: false

test_script:
- cargo test --all # cannot use --all and --features together
- cargo test --all --tests # cannot use --all and --features together
- cargo test --all --benches
- cargo test --features serde1,log,nightly
- cargo test --tests --no-default-features --features=alloc,serde1
- cargo test --package rand_core --no-default-features --features=alloc,serde1
- cargo test --package rand_core:0.2.2 --no-default-features --features=alloc,serde1 --tests
3 changes: 3 additions & 0 deletions rand_core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ 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.2.2] - 2018-10-03
Create a compatibility shim around 0.3.

## [0.2.1] - 2018-06-08
- References to a `CryptoRng` now also implement `CryptoRng`. (#470)

Expand Down
18 changes: 8 additions & 10 deletions rand_core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "rand_core"
version = "0.2.1" # NB: When modifying, also modify html_root_url in lib.rs
version = "0.2.2" # NB: When modifying, also modify html_root_url in lib.rs
authors = ["The Rust Project Developers"]
license = "MIT/Apache-2.0"
readme = "README.md"
repository = "https://github.com/rust-lang-nursery/rand"
repository = "https://github.com/rust-random/rand"
documentation = "https://docs.rs/rand_core"
homepage = "https://crates.io/crates/rand_core"
description = """
Expand All @@ -14,15 +14,13 @@ keywords = ["random", "rng"]
categories = ["algorithms", "no-std"]

[badges]
travis-ci = { repository = "rust-lang-nursery/rand" }
appveyor = { repository = "alexcrichton/rand" }
travis-ci = { repository = "rust-random/rand" }
appveyor = { repository = "rust-random/rand" }

[features]
default = ["std"]
std = ["alloc"] # use std library; should be default but for above bug
alloc = [] # enables Vec and Box support without std
serde1 = ["serde", "serde_derive"] # enables serde for BlockRng wrapper
std = ["rand_core/std"] # use std library; should be default but for above bug
alloc = ["rand_core/alloc"] # enables Vec and Box support without std
serde1 = ["rand_core/serde1"] # enables serde for BlockRng wrapper

[dependencies]
serde = { version = "1", optional = true }
serde_derive = { version = "^1.0.38", optional = true }
rand_core = { version = "0.3", default-features = false }
2 changes: 2 additions & 0 deletions rand_core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
Core traits and error types of the [rand] library, plus tools for implementing
RNGs.

This version of `rand_core` is a compatibility shim around version 0.3.

This crate is intended for use when implementing the core trait, `RngCore`; it
defines the core traits to be implemented as well as several small functions to
aid in their implementation and types required for error handling.
Expand Down
Loading

0 comments on commit 8648fec

Please sign in to comment.