diff --git a/Cargo.lock b/Cargo.lock index 445860f..8c91175 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,5 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. [[package]] -name = "rouilleOS" +name = "rouille_os" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 069a18b..e9e2a98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,14 @@ [package] -name = "rouilleOS" +name = "rouille_os" version = "0.1.0" authors = ["Ruidy "] edition = "2018" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] + +[profile.dev] +panic = "abort" # disable stack unwinding on panic + +[profile.release] +panic = "abort" # disable stack unwinding on panic \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index d774d11..6a525d9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,14 @@ #![no_std] - +#![no_main] use core::panic::PanicInfo; -fn main() {} +/// Disabling mangling ensures the compiler returns a function named `_start` +/// +/// We tell the compiler to use `C calling convention` +#[no_mangle] +pub extern "C" fn _start() -> ! { + loop {} +} /// Function called on panic. It is a diverging function with a `never` return type. /// /// # Arguments