From 9b73d703b45e6634a661083c48b4a9cfe9cbb6fb Mon Sep 17 00:00:00 2001 From: Paul Pan Date: Fri, 29 Dec 2023 17:00:48 +0800 Subject: [PATCH] chore: no lib --- src/lib.rs | 25 ------------------------- src/main.rs | 34 +++++++++++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 28 deletions(-) delete mode 100644 src/lib.rs diff --git a/src/lib.rs b/src/lib.rs deleted file mode 100644 index 2e5b36b..0000000 --- a/src/lib.rs +++ /dev/null @@ -1,25 +0,0 @@ -#![no_std] -#![feature(asm_const)] -#![feature(naked_functions)] -#![feature(panic_info_message)] -#![feature(stmt_expr_attributes)] - -extern crate static_assertions; - -// arch -pub mod arch; - -// rust language runtime -pub mod lang; - -// entrypoint -pub mod entry; - -// page table -pub mod mm; - -// utils -pub mod utils; - -// logging -pub mod logging; diff --git a/src/main.rs b/src/main.rs index 7a84ed8..1846267 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,34 @@ +// We handle entrypoint in arch #![no_std] #![no_main] +// Features +#![feature(asm_const)] +#![feature(naked_functions)] +#![feature(panic_info_message)] +#![feature(stmt_expr_attributes)] +// Test Infrastructure +#![feature(custom_test_frameworks)] +#![test_runner(test_runner::runner)] +#![reexport_test_harness_main = "test_main"] +#![cfg_attr(test, allow(dead_code))] + +extern crate static_assertions; + +// arch +pub mod arch; + +// rust language runtime +pub mod lang; + +// entrypoint +pub mod entry; + +// page table +pub mod mm; + +// utils +pub mod utils; + +// logging +pub mod logging; -#[allow(unused_imports)] -#[allow(clippy::single_component_path_imports)] -use tiny_os;