From c343a60d3e55dc7055e3e66fccf114a950acc9a2 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 b9ec073..02a658e 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 a53754b..6f2214d 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,