zig/example/hello_world/hello_libc.zig
2016-01-25 23:21:13 -07:00

12 lines
200 B
Zig

export executable "hello";
#link("c")
extern {
fn printf(__format: &const u8, ...) -> c_int;
}
export fn main(argc: c_int, argv: &&u8) -> c_int {
printf(c"Hello, world!\n");
return 0;
}