Create a cargo workspace with a new blog_os crate at the root

This commit is contained in:
Philipp Oppermann
2023-04-30 14:53:36 +02:00
parent 4ea28d0910
commit ecf8fe826b
5 changed files with 37 additions and 19 deletions

9
kernel/Cargo.toml Normal file
View File

@@ -0,0 +1,9 @@
[package]
name = "kernel"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bootloader_api = "0.11.0"

16
kernel/src/main.rs Normal file
View File

@@ -0,0 +1,16 @@
#![no_std]
#![no_main]
use core::panic::PanicInfo;
bootloader_api::entry_point!(kernel_main);
fn kernel_main(bootinfo: &'static mut bootloader_api::BootInfo) -> ! {
loop {}
}
/// This function is called on panic.
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {}
}