Skip to content

Commit 761d948

Browse files
committed
Get everything compiling
1 parent 90298e4 commit 761d948

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/main.rs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,23 @@
1-
fn main() {
1+
#![feature(lang_items, unwind_attributes)]
2+
3+
#![no_std]
4+
#![no_main]
5+
6+
#[no_mangle]
7+
pub extern fn main() {
28
}
9+
10+
// These do not need to be in a module, but we group them here for clarity.
11+
pub mod std {
12+
#[lang = "eh_personality"]
13+
#[no_mangle]
14+
pub unsafe extern "C" fn rust_eh_personality(state: (), exception_object: *mut (), context: *mut ()) -> () {
15+
}
16+
17+
#[lang = "panic_fmt"]
18+
#[unwind]
19+
pub extern fn rust_begin_panic(msg: (), file: &'static str, line: u32) -> ! {
20+
loop { }
21+
}
22+
}
23+

0 commit comments

Comments
 (0)