From c51f40f8da5abf725ab545bff842028be20a09f3 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Mon, 13 Nov 2023 12:07:45 -0500 Subject: [PATCH] feat: add default std feature --- Cargo.toml | 4 ++++ src/lib.rs | 5 +++++ 2 files changed, 9 insertions(+) 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;