ableos/ableos/src/lib.rs

100 lines
1.8 KiB
Rust
Raw Normal View History

//! main library for the AbleOS kernel.
//! exposing all the kernel functionality to the rest of the kernel.
//!
//!
2021-11-21 08:13:50 +00:00
2021-11-16 06:09:27 +00:00
#![no_std]
2021-11-22 16:30:49 +00:00
#![feature(
abi_x86_interrupt,
2021-11-27 15:19:08 +00:00
asm_sym,
2021-11-23 11:53:06 +00:00
alloc_error_handler,
2021-11-22 16:30:49 +00:00
core_intrinsics,
2022-02-01 23:06:00 +00:00
exclusive_range_pattern,
2021-11-22 16:30:49 +00:00
lang_items,
2022-02-01 23:06:00 +00:00
naked_functions,
2022-02-03 19:47:58 +00:00
slice_pattern
2021-11-22 16:30:49 +00:00
)]
2021-11-16 06:09:27 +00:00
2022-01-27 04:06:04 +00:00
/// Contains architecture specific code for aarch64.
2021-11-16 06:09:27 +00:00
#[cfg(target_arch = "aarch64")]
#[path = "arch/aarch64/mod.rs"]
2021-11-22 16:30:49 +00:00
pub mod arch;
2021-11-16 06:09:27 +00:00
2022-01-27 04:06:04 +00:00
/// Contains architecture specific code for x86_64.
2021-11-16 06:09:27 +00:00
#[cfg(target_arch = "x86_64")]
#[path = "arch/x86_64/mod.rs"]
2021-11-22 16:30:49 +00:00
pub mod arch;
2022-01-27 04:06:04 +00:00
/// Contains architecture specific code for riscv64.
#[cfg(target_arch = "riscv64")]
#[path = "arch/riscv/mod.rs"]
2021-11-22 16:30:49 +00:00
pub mod arch;
2021-11-16 06:09:27 +00:00
#[macro_use]
pub mod print;
2022-02-18 16:04:10 +00:00
// pub mod devices;
// pub mod wasm_jumploader;
2022-01-16 20:55:58 +00:00
2022-01-17 01:42:11 +00:00
#[macro_use]
pub extern crate log;
/////////////
// Modules //
/////////////
2021-11-27 15:19:08 +00:00
pub mod allocator;
2022-01-22 06:01:16 +00:00
pub mod boot_conf;
2021-11-22 16:30:49 +00:00
pub mod driver_traits;
pub mod experiments;
2022-01-18 12:15:51 +00:00
pub mod graphics;
pub mod kernel_state;
2021-11-16 06:09:27 +00:00
pub mod keyboard;
2021-11-22 16:30:49 +00:00
pub mod kmain;
2022-01-17 01:42:11 +00:00
pub mod logger;
2021-11-22 16:30:49 +00:00
pub mod panic;
2022-02-18 16:04:10 +00:00
// pub mod proto_filetable;
2021-11-16 06:09:27 +00:00
pub mod relib;
2022-02-18 16:04:10 +00:00
// pub mod scheduler;
2022-01-17 01:42:11 +00:00
mod unicode_utils;
pub mod utils;
2022-02-18 16:04:10 +00:00
// pub mod vga_e;
2022-01-26 01:40:37 +00:00
pub mod wasm;
2021-12-28 08:56:29 +00:00
pub extern crate alloc;
2021-12-24 14:04:07 +00:00
pub extern crate externc_libm as libm;
2022-01-07 16:31:47 +00:00
//////////////////
// Re-exports ///
////////////////
pub use allocator::*;
pub use boot_conf::*;
pub use driver_traits::*;
pub use experiments::*;
pub use graphics::*;
pub use kernel_state::*;
pub use keyboard::*;
pub use logger::*;
pub use panic::*;
2022-02-18 16:04:10 +00:00
// pub use proto_filetable::*;
pub use relib::*;
2022-02-18 16:04:10 +00:00
// pub use scheduler::*;
pub use utils::*;
2022-02-18 16:04:10 +00:00
// pub use vga_e::*;
pub use wasm::*;
//////////////////
pub mod virtio;
pub use virtio::*;
2022-01-27 07:37:12 +00:00
2022-02-18 16:04:10 +00:00
// pub mod alias_table;
// pub use alias_table::*;
2022-01-27 07:37:12 +00:00
2022-02-18 16:04:10 +00:00
/*
2022-01-27 07:37:12 +00:00
pub mod tests;
pub use tests::*;
2022-02-18 16:04:10 +00:00
pub mod syscalls;
2022-02-03 19:47:58 +00:00
pub use syscalls::*;
2022-02-12 09:25:02 +00:00
*/
2022-02-08 09:01:29 +00:00
pub mod scratchpad;
pub use scratchpad::*;
2022-02-18 16:04:10 +00:00
// pub mod filesystem;