mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 23:52:31 +00:00
50339f595a
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
20 lines
294 B
Zig
20 lines
294 B
Zig
extern "c" fn write(c_int, usize, usize) usize;
|
|
extern "c" fn exit(c_int) noreturn;
|
|
|
|
pub export fn main() noreturn {
|
|
print();
|
|
|
|
exit(0);
|
|
}
|
|
|
|
fn print() void {
|
|
const msg = @intFromPtr("Hello, World!\n");
|
|
const len = 14;
|
|
_ = write(1, msg, len);
|
|
}
|
|
|
|
// run
|
|
//
|
|
// Hello, World!
|
|
//
|