diff --git a/src/instruction.rs b/src/instruction.rs index 2b60044..b8c9eac 100644 --- a/src/instruction.rs +++ b/src/instruction.rs @@ -2,7 +2,9 @@ mod opcode; -use std::fmt::{self, Display, Formatter}; +use alloc::format; +use alloc::string::String; +use core::fmt::{self, Display, Formatter}; /// Instruction #[derive(Debug)] diff --git a/src/lib.rs b/src/lib.rs index cfe71c8..e2946c5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,6 +22,8 @@ //! // --output-- //! // addi t0, t0, -276 //! ``` +#![cfg_attr(not(test), no_std)] +extern crate alloc; pub mod decode; pub mod instruction;