diff --git a/Cargo.toml b/Cargo.toml index 0866b3e..8c10f8e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,7 @@ libm = { version = "0.2.7", optional = true } wasi = { version = "0.11.0", default-features = false } [features] +std = ["alloc"] alloc = [] derive = ["asr-derive"] flags = ["bitflags"] diff --git a/src/lib.rs b/src/lib.rs index d22d79b..8f1d560 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -#![no_std] +#![cfg_attr(not(feature = "std"), no_std)] #![warn( clippy::complexity, clippy::correctness,