From c4efe1188501b2b35bb7ee0dce7093825c5c4cdb Mon Sep 17 00:00:00 2001 From: AlexKnauth Date: Mon, 16 Oct 2023 17:33:11 -0400 Subject: [PATCH] Feature std to disable no_std --- Cargo.toml | 1 + src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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,