asterinas/kernel/src/lib.rs

63 lines
1.3 KiB
Rust
Raw Normal View History

// SPDX-License-Identifier: MPL-2.0
2024-08-19 11:15:22 +00:00
//! Aster-nix is the Asterinas kernel, a safe, efficient unix-like
//! operating system kernel built on top of OSTD and OSDK.
#![no_std]
#![no_main]
#![deny(unsafe_code)]
2024-08-19 11:15:22 +00:00
#![feature(btree_cursors)]
2024-08-17 08:06:35 +00:00
#![feature(debug_closure_helpers)]
2024-08-19 11:15:22 +00:00
#![feature(format_args_nl)]
#![feature(linked_list_cursors)]
#![feature(linked_list_retain)]
2024-08-19 11:15:22 +00:00
#![feature(negative_impls)]
#![feature(panic_can_unwind)]
2024-08-19 11:15:22 +00:00
#![feature(register_tool)]
#![feature(min_specialization)]
2025-11-20 15:51:19 +00:00
#![feature(thin_box)]
2024-08-19 11:15:22 +00:00
#![feature(trait_alias)]
2025-04-11 07:32:56 +00:00
#![feature(associated_type_defaults)]
2024-08-19 11:15:22 +00:00
#![register_tool(component_access_control)]
extern crate alloc;
extern crate lru;
#[macro_use]
extern crate controlled;
#[macro_use]
extern crate getset;
#[cfg_attr(target_arch = "x86_64", path = "arch/x86/mod.rs")]
#[cfg_attr(target_arch = "riscv64", path = "arch/riscv/mod.rs")]
#[cfg_attr(target_arch = "loongarch64", path = "arch/loongarch/mod.rs")]
2025-08-22 01:30:20 +00:00
mod arch;
mod context;
mod cpu;
mod device;
mod driver;
mod error;
mod events;
mod fs;
mod init;
2025-08-22 01:30:20 +00:00
mod ipc;
mod net;
mod prelude;
2024-08-19 11:15:22 +00:00
mod process;
mod sched;
2025-09-23 02:32:16 +00:00
mod security;
2025-08-22 01:30:20 +00:00
mod syscall;
mod thread;
mod time;
2024-08-19 11:15:22 +00:00
mod util;
2025-08-07 21:15:53 +00:00
// TODO: Add vDSO support for other architectures.
#[cfg(any(target_arch = "x86_64", target_arch = "riscv64"))]
2025-08-22 01:30:20 +00:00
mod vdso;
mod vm;
2024-06-20 06:16:04 +00:00
#[ostd::main]
2024-08-19 11:15:22 +00:00
#[controlled]
2025-08-22 01:30:20 +00:00
fn main() {
init::main();
}