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