libc-print 0.2.0

println! and eprintln! macros on libc without stdlib
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![cfg_attr(nostartfiles, no_main)]
use libc_print::*;

#[cfg(all(nostartfiles))]
#[no_mangle]
pub extern "C" fn _start() -> ! {
    libc_println!("Hello, {}!", "world");
    unsafe {
        libc::exit(0);
    }
}

#[cfg(not(nostartfiles))]
fn main() {
    libc_println!("Hello, {}!", "world");
}