no_std building support

This commit is contained in:
Jeremy Soller
2020-09-08 10:24:53 -06:00
parent d153af8b83
commit 29945b84b1
3 changed files with 14 additions and 4 deletions
+5
View File
@@ -6,4 +6,9 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
[features]
default = ["std"]
std = []
+7 -2
View File
@@ -6,8 +6,13 @@ use crate::{
VirtualAddress,
};
pub mod emulate;
pub mod x86_64;
#[cfg(feature = "std")]
pub use self::emulate::EmulateArch;
pub use self::x86_64::X8664Arch;
#[cfg(feature = "std")]
mod emulate;
mod x86_64;
pub trait Arch {
const PAGE_SHIFT: usize;
+2 -2
View File
@@ -1,8 +1,8 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![feature(asm)]
pub use crate::{
arch::Arch,
arch::emulate::*,
arch::*,
page::{
PageEntry,
PageTable