diff --git a/.gitignore b/.gitignore index 3b7f41e..913b8f6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ gamarjoba_munde/gamarjoba baremetal_gamarjoba/baremetal_gamarjoba keyboard/keyboard_kernel +target/ diff --git a/os-in-rust/Cargo.lock b/os-in-rust/Cargo.lock new file mode 100644 index 0000000..53abacc --- /dev/null +++ b/os-in-rust/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "os-in-rust" +version = "0.1.0" diff --git a/os-in-rust/Cargo.toml b/os-in-rust/Cargo.toml new file mode 100644 index 0000000..9ee4167 --- /dev/null +++ b/os-in-rust/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "os-in-rust" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[profile.dev] +panic = "abort" + +[profile.release] +panic = "abort" + +[dependencies] diff --git a/os-in-rust/src/main.rs b/os-in-rust/src/main.rs new file mode 100644 index 0000000..92ba41b --- /dev/null +++ b/os-in-rust/src/main.rs @@ -0,0 +1,15 @@ +#![no_std] +#![no_main] + +use core::panic::PanicInfo; + +#[panic_handler] +fn panic(_info: &PanicInfo) -> ! { + loop {} +} + +#[no_mangle] +pub extern "C" fn _start() -> ! { + loop {} +} +