Feature alloc for graphics
This commit is contained in:
parent
689ecc7bf3
commit
57799a188b
|
@ -28,3 +28,10 @@ x86_64 = "0.9.6"
|
|||
[dependencies.num-traits]
|
||||
version = "0.2.11"
|
||||
default-features = false
|
||||
|
||||
[features]
|
||||
default = []
|
||||
alloc = []
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = ["alloc"]
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#![no_std]
|
||||
#![warn(missing_docs)]
|
||||
|
||||
#[cfg(feature = "alloc")]
|
||||
extern crate alloc;
|
||||
|
||||
pub mod colors;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
//! Writers for common vga modes.
|
||||
#[cfg(feature = "alloc")]
|
||||
mod graphics_320x200x256;
|
||||
#[cfg(feature = "alloc")]
|
||||
mod graphics_640x480x16;
|
||||
mod text_40x25;
|
||||
mod text_40x50;
|
||||
|
@ -11,7 +13,9 @@ use super::{
|
|||
vga::VGA,
|
||||
};
|
||||
|
||||
#[cfg(feature = "alloc")]
|
||||
pub use graphics_320x200x256::Graphics320x200x256;
|
||||
#[cfg(feature = "alloc")]
|
||||
pub use graphics_640x480x16::Graphics640x480x16;
|
||||
pub use text_40x25::Text40x25;
|
||||
pub use text_40x50::Text40x50;
|
||||
|
|
Loading…
Reference in a new issue