add necessary hello.c code as we dont have linking step

This commit is contained in:
Luna 2019-09-27 21:22:03 -03:00
parent 849bbc0e94
commit dfb7989123
2 changed files with 6 additions and 1 deletions

5
examples/hello.c Normal file
View file

@ -0,0 +1,5 @@
#include <stdio.h>
int main(void) {
printf("add(2, 2) = %d\n", add(2, 2));
}

View file

@ -47,7 +47,7 @@ fn func_refer_param(b: i32) i32 {
}
fn add(a: i32, b: i32) i32 {
return 69 + 69;
return a + b;
}
fn and_fn() bool {