From 1cfc84789245d834d545f7935e062a82f39e9dbf Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 12 Feb 2019 19:40:51 +0100 Subject: [PATCH] document and guarantee MSRV --- .travis.yml | 5 +++++ src/lib.rs | 30 ++++++++++++++++++------------ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7430c42e..fceab721 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,11 @@ language: rust matrix: include: + # MSRV + - env: TARGET=x86_64-unknown-linux-gnu + rust: 1.30.0 + if: branch != master + - env: TARGET=x86_64-unknown-linux-gnu rust: stable if: branch != master diff --git a/src/lib.rs b/src/lib.rs index 07f79017..b80112b1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -51,31 +51,37 @@ //! - [`IndexMap`](struct.IndexMap.html) -- hash table //! - [`IndexSet`](struct.IndexSet.html) -- hash set //! - [`LinearMap`](struct.LinearMap.html) -//! - [`Queue`](spsc/struct.Queue.html) -- single producer single consumer lockless queue +//! - [`spsc::Queue`](spsc/struct.Queue.html) -- single producer single consumer lock-free queue //! - [`String`](struct.String.html) //! - [`Vec`](struct.Vec.html) //! +//! # Minimum Supported Rust Version (MSRV) //! -//! In order to target the Rust stable toolchain, there are some feature gates. -//! The features need to be enabled in `Cargo.toml` in order to use them. -//! Once the underlaying features in Rust are stable, -//! these feature gates might be activated by default. +//! This crate is guaranteed to compile on stable Rust 1.30 and up with its default set of features. +//! It *might* compile on older versions but that may change in any new patch release. +//! +//! # Cargo features +//! +//! In order to target the Rust stable toolchain, there are some opt-in Cargo features. The features +//! need to be enabled in `Cargo.toml` in order to use them. Once the underlying features in Rust +//! are stable, these feature gates may be activated by default. //! //! Example of `Cargo.toml`: //! -//! ```text -//! ... +//! ``` text +//! # .. //! [dependencies] //! heapless = { version = "0.4.0", features = ["const-fn"] } -//! ... -//! +//! # .. //! ``` //! -//! Currently the following features are availbale and not active by default: +//! Currently the following features are available and not active by default: //! -//! - `"const-fn"` -- Enable the nightly `const_fn` feature and make most `new` methods `const`. -//! This way they can be used to initialize static memory at compile time. +//! - `"const-fn"` -- Enables the nightly `const_fn` and `untagged_unions` features and makes most +//! `new` methods `const`. This way they can be used to initialize static memory at compile time. //! +//! - `"smaller-atomics"` -- Lets you initialize `spsc::Queue`s with smaller head / tail indices +//! (they default to `usize`), shrinking the overall size of the queue. #![allow(warnings)] #![deny(missing_docs)]