no_std building support
This commit is contained in:
@@ -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
@@ -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
@@ -1,8 +1,8 @@
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![feature(asm)]
|
||||
|
||||
pub use crate::{
|
||||
arch::Arch,
|
||||
arch::emulate::*,
|
||||
arch::*,
|
||||
page::{
|
||||
PageEntry,
|
||||
PageTable
|
||||
|
||||
Reference in New Issue
Block a user