aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index bea81eb..3082bdf 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,7 +1,10 @@
#![feature(const_fn)]
#![feature(test)]
+#![cfg_attr(not(test), no_std)]
-#[cfg(test)]
+extern crate alloc;
+
+#[cfg(all(test, feature = "std"))]
extern crate test;
mod deserialize;
@@ -17,6 +20,6 @@ pub mod v1_15_2;
pub use deserialize::*;
pub use serialize::*;
-#[cfg(test)]
+#[cfg(all(test, feature = "std"))]
mod test_macros;
mod chat;