diff --git a/Cargo.toml b/Cargo.toml index b777067..3ab82d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,3 +8,7 @@ description = "A better Box" repository = "https://github.com/dtolnay/anyhow" documentation = "https://docs.rs/anyhow" readme = "README.md" + +[features] +default = ["std"] +std = [] diff --git a/src/lib.rs b/src/lib.rs index 927638c..6299dc0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,6 +4,9 @@ mod as_dyn_error; mod context; mod error; +#[cfg(not(feature = "std"))] +compile_error!("no_std support is not implemented yet"); + pub use crate::as_dyn_error::AsDynError; pub use crate::context::Context; pub use crate::error::{Chain, Error};