Free standing rust binary

This commit is contained in:
thatscringebro 2024-09-09 16:48:07 -04:00
parent 9366d6c90e
commit a0b3d273b2
2 changed files with 19 additions and 2 deletions

View File

@ -3,4 +3,10 @@ name = "simpleos"
version = "0.1.0"
edition = "2021"
[profile.dev]
panic = "abort"
[profile.release]
panic = "abort"
[dependencies]

View File

@ -1,3 +1,14 @@
fn main() {
println!("Hello, world!");
#![no_std]
#![no_main]
use core::panic::PanicInfo;
#[no_mangle]
pub extern "C" fn _start() -> ! {
loop {}
}
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {}
}