mirror of
https://github.com/ziglang/zig.git
synced 2024-11-29 00:22:33 +00:00
16 lines
371 B
Zig
16 lines
371 B
Zig
const c = @cImport({
|
|
// See https://github.com/ziglang/zig/issues/515
|
|
@cDefine("_NO_CRT_STDIO_INLINE", "1");
|
|
@cInclude("stdio.h");
|
|
@cInclude("string.h");
|
|
});
|
|
|
|
const msg = "Hello, world!\n";
|
|
|
|
pub export fn main(argc: c_int, argv: **u8) c_int {
|
|
_ = argv;
|
|
_ = argc;
|
|
if (c.printf(msg) != @intCast(c_int, c.strlen(msg))) return -1;
|
|
return 0;
|
|
}
|