2015-11-28 12:24:11 +08:00
|
|
|
export executable "hello";
|
|
|
|
|
2015-11-25 14:44:41 +08:00
|
|
|
#link("c")
|
2015-11-24 17:43:45 +08:00
|
|
|
extern {
|
2015-12-09 16:03:04 +08:00
|
|
|
fn printf(__format: *const u8, ...) -> i32;
|
|
|
|
fn exit(__status: i32) -> unreachable;
|
2015-11-24 17:43:45 +08:00
|
|
|
}
|
|
|
|
|
2015-11-28 06:46:06 +08:00
|
|
|
export fn _start() -> unreachable {
|
2015-12-09 16:03:04 +08:00
|
|
|
printf("Hello, world!\n");
|
2015-11-25 04:00:38 +08:00
|
|
|
exit(0);
|
2015-08-06 06:46:40 +08:00
|
|
|
}
|