Skip to content

Commit

Permalink
freestanding rust binary
Browse files Browse the repository at this point in the history
  • Loading branch information
greeenboi committed Nov 4, 2023
0 parents commit 1a754e9
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "blog_os"
version = "0.1.0"
edition = "2021"
authors = ["Suvangs Ishanroy Pratyushagr"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[profile.dev]
panic = "abort"#disable stack unwinding on panic

[profile.release]
panic = "abort"

[dependencies]
16 changes: 16 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#![no_std]
#![no_main]
use core::panic::PanicInfo;


#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {}
}


#![no_mangle]
pub extern "C" fn _start() -> ! {
loop {}
}

0 comments on commit 1a754e9

Please sign in to comment.