[tmp.QBzKi9xLVg]nortti@marras:~/tmp/tmp.QBzKi9xLVg$ cat ret42.c
#![no_main]
#[no_mangle]
pub fn main() -> u32 {
return 42;
}
[tmp.QBzKi9xLVg]nortti@marras:~/tmp/tmp.QBzKi9xLVg$ rustc ret42.c
[tmp.QBzKi9xLVg]nortti@marras:~/tmp/tmp.QBzKi9xLVg$ ./ret42
[tmp.QBzKi9xLVg]nortti@marras:~/tmp/tmp.QBzKi9xLVg$ echo $?
42
[tmp.QBzKi9xLVg]nortti@marras:~/tmp/tmp.QBzKi9xLVg$