ableos/ableos/src/lib.rs

98 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]
2022-06-15 22:19:36 +00:00
#![feature(
abi_x86_interrupt,
alloc_error_handler,
asm_sym, // Needed for RISC-V
naked_functions,
prelude_import,
)]
2022-04-11 22:23:11 +00:00
#[macro_use]
pub extern crate log;
pub extern crate alloc;
pub extern crate externc_libm as libm;
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 riscv64.
#[cfg(target_arch = "riscv64")]
#[path = "arch/riscv/mod.rs"]
2021-11-22 16:30:49 +00:00
pub mod arch;
2022-04-11 22:23:11 +00:00
/// Contains architecture specific code for x86_64.
#[cfg(target_arch = "x86_64")]
#[path = "arch/x86_64/mod.rs"]
pub mod arch;
2022-01-16 20:55:58 +00:00
2022-03-11 20:18:07 +00:00
#[cfg(target_arch = "x86_64")]
pub mod port_io;
2022-03-11 23:13:41 +00:00
#[macro_use]
2022-04-11 22:23:11 +00:00
pub mod print;
2022-03-11 23:13:41 +00:00
2022-01-17 01:42:11 +00:00
#[macro_use]
2022-04-11 22:23:11 +00:00
pub mod serial_print;
2022-04-11 22:23:11 +00:00
pub mod boot_conf;
pub mod devices;
2021-11-22 16:30:49 +00:00
pub mod driver_traits;
pub mod experiments;
2022-04-11 22:23:11 +00:00
pub mod filesystem;
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;
2022-04-11 22:23:11 +00:00
pub mod prelude;
2022-07-31 06:54:01 +00:00
pub mod ps2_mouse;
2021-11-16 06:09:27 +00:00
pub mod relib;
2022-04-11 22:23:11 +00:00
pub mod rhai_shell;
2022-02-20 11:05:50 +00:00
pub mod scheduler;
2022-04-11 22:23:11 +00:00
pub mod scratchpad;
pub mod stdio;
pub mod time;
pub mod utils;
2022-04-11 22:23:11 +00:00
pub mod virtio;
2022-01-26 01:40:37 +00:00
pub mod wasm;
2022-04-11 22:23:11 +00:00
pub mod wasm_jumploader;
2022-06-22 18:59:24 +00:00
pub mod allocator;
// pub use allocator as aalloc;
2022-07-28 08:39:20 +00:00
pub mod channels;
pub mod handle;
2022-07-31 06:54:01 +00:00
pub mod hardware;
2022-07-28 15:57:28 +00:00
pub mod ipc;
2022-07-29 17:48:45 +00:00
pub mod panic;
2022-04-11 22:23:11 +00:00
mod unicode_utils;
2022-06-02 11:00:26 +00:00
pub mod vga_e;
2022-07-31 06:54:01 +00:00
pub mod vgai;
pub mod vterm;
2022-01-07 16:31:47 +00:00
2022-04-11 22:23:27 +00:00
#[prelude_import]
pub use prelude::rust_2021::*;
pub use driver_traits::*;
pub use experiments::*;
pub use graphics::*;
2022-04-11 22:23:11 +00:00
pub use kernel;
pub use kernel::messaging;
2022-07-29 17:48:45 +00:00
// pub use kernel::panic;
pub use kernel_state::*;
pub use keyboard::*;
pub use logger::*;
pub use relib::*;
2022-04-11 22:23:11 +00:00
pub use scratchpad::*;
pub use utils::*;
pub use virtio::*;
2022-04-11 22:23:11 +00:00
pub use wasm::*;