zig/example/hello_world/hello_libc.zig

10 lines
192 B
Zig

#link("c")
export executable "hello";
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;
}