1 // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // Smallest "hello world" with a libc runtime
13 // pretty-expanded FIXME #23616
15 #![feature(intrinsics, lang_items, start, no_core, libc)]
20 extern { fn puts(s: *const u8); }
21 extern "rust-intrinsic" { fn transmute<T, U>(t: T) -> U; }
23 #[lang = "eh_personality"] extern fn eh_personality() {}
24 #[lang = "eh_unwind_resume"] extern fn eh_unwind_resume() {}
25 #[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
28 fn main(_
: isize, _
: *const *const u8) -> isize {
30 let (ptr
, _
): (*const u8, usize) = transmute("Hello!\0");
36 #[cfg(target_os = "android")]