zig/example/hello_world/hello.zig

13 lines
224 B
Zig
Raw Normal View History

export executable "hello";
#link("c")
2015-11-24 17:43:45 +08:00
extern {
fn printf(__format: *const u8, ...) -> i32;
fn exit(__status: i32) -> unreachable;
2015-11-24 17:43:45 +08:00
}
export fn _start() -> unreachable {
printf("Hello, world!\n");
exit(0);
2015-08-06 06:46:40 +08:00
}