feat: add files

This commit is contained in:
2020-09-30 23:52:26 +08:00
parent 820a5707fa
commit 8f8bc6eca9
5 changed files with 15 additions and 0 deletions

1
.gitignore vendored
View File

@@ -5,6 +5,7 @@ target/
99.htm 99.htm
wasm/pkg/ wasm/pkg/
node_modules/ node_modules/
*.o
# These are backup files generated by rustfmt # These are backup files generated by rustfmt
**/*.rs.bk **/*.rs.bk

5
live-reload-rust/greet.c Normal file
View File

@@ -0,0 +1,5 @@
#include <stdio.h>
void greet(const char *name) {
printf("Hello, %s!\n", name);
}

View File

@@ -0,0 +1 @@
gcc -Wall -c greet.c

View File

@@ -0,0 +1,6 @@
extern void greet(const char *name);
int main(void) {
greet("stars");
return 0;
}

View File

@@ -0,0 +1,2 @@
gcc -Wall -c main-greet.c
gcc main-greet.o greet.o -o main-greet