Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rand_core 0.2.2: a compatibility shim around 0.3 #619

Merged
merged 2 commits into from
Oct 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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