2023-04-19 21:17:48 +08:00
|
|
|
extern "c" fn write(c_int, usize, usize) usize;
|
2022-04-28 05:36:29 +08:00
|
|
|
|
|
|
|
pub fn main() void {
|
|
|
|
print();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn print() void {
|
2023-06-15 15:14:16 +08:00
|
|
|
const msg = @intFromPtr("Hello, World!\n");
|
2022-04-28 05:36:29 +08:00
|
|
|
const len = 14;
|
|
|
|
_ = write(1, msg, len);
|
|
|
|
}
|
|
|
|
|
|
|
|
// run
|
|
|
|
//
|
|
|
|
// Hello, World!
|
|
|
|
//
|