Files
FoundryOS/kernel/src/main.rs
T
2025-03-05 22:21:38 +00:00

39 lines
791 B
Rust

#![no_std]
#![no_main]
extern crate alloc;
use foundry_os::arch::x86_64::processing::async_io::task::{Executor, Task};
use foundry_os::prelude::*;
use foundry_os::util::shell::shell;
#[unsafe(no_mangle)]
extern "C" fn kmain() -> ! {
println_log!(" [ Initialising Kernel Systems ] ");
if let Err(err) = foundry_os::boot() {
panic!("{}", err);
}
println_log!(" [ Kernel Initialised Successfully ] ");
// println!("TESTING :: Allocation");
// let somevec = vec![0; 1_000_000];
// println!("{:?}", somevec);
// println!("{}", somevec.len());
// println!("PASSED!");
test1();
let mut executor = Executor::new();
executor.spawn(Task::new(shell()));
executor.run()
}
fn test1() {
test2()
}
fn test2() {
panic!("Test");
}