zig/example/hello_world/hello_libc.zig
Andrew Kelley ac630d354d std: print_str no longer requires length argument
add explicit casting support from array to string
2015-12-12 02:05:08 -07:00

13 lines
224 B
Zig

export executable "hello";
#link("c")
extern {
fn printf(__format: *const u8, ...) -> i32;
fn exit(__status: i32) -> unreachable;
}
export fn _start() -> unreachable {
printf("Hello, world!\n");
exit(0);
}