Make alloc an optional default feature

This commit is contained in:
Gwilym Kuiper 2021-08-16 23:32:31 +01:00
parent 469db77437
commit bec0cc6055
2 changed files with 6 additions and 4 deletions

View file

@ -14,8 +14,9 @@ debug = true
lto = true
debug = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
default = ["alloc"]
alloc = []
[dependencies]
bitflags = "1.2"

View file

@ -13,7 +13,10 @@
//! internal workings of the Game Boy Advance whilst still being high
//! performance and memory efficient.
#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(feature = "alloc")]
mod agb_alloc;
/// Implements everything relating to things that are displayed on screen.
pub mod display;
@ -34,8 +37,6 @@ pub mod mgba;
pub mod number;
mod single;
mod agb_alloc;
/// System BIOS calls / syscalls.
pub mod syscall;