Freestanding binary

This commit is contained in:
greg 2019-07-09 09:42:41 -07:00
parent 5448750610
commit 8d88b46702
2 changed files with 20 additions and 2 deletions

View File

@ -4,4 +4,11 @@ version = "0.1.0"
authors = ["greg <greg.shuflin@protonmail.com>"] authors = ["greg <greg.shuflin@protonmail.com>"]
edition = "2018" edition = "2018"
[profile.dev]
panic = "abort"
[profile.release]
panic = "abort"
[dependencies] [dependencies]

View File

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