diff --git a/Cargo.toml b/Cargo.toml index d93e5b9b..230c77e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,6 +34,10 @@ exclude = [ "benches" ] +[features] +default = ["std"] +std = [] + [dependencies] bytes = "1" fnv = "1.0.5" diff --git a/src/lib.rs b/src/lib.rs index 22901438..c845fd7a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -160,6 +160,11 @@ #![deny(warnings, missing_docs, missing_debug_implementations)] +//#![cfg_attr(not(feature = "std"), no_std)] +#[cfg(not(feature = "std"))] +compile_error!("`std` feature currently required, support for `no_std` may be added later"); + + #[cfg(test)] #[macro_use] extern crate doc_comment;