feat: add rust link a

This commit is contained in:
2021-01-24 23:10:46 +08:00
parent db388a6e37
commit c6e36fb414
9 changed files with 73 additions and 0 deletions

11
__ffi/rust_link_a/hello.c Normal file
View File

@@ -0,0 +1,11 @@
#include <stdio.h>
#include "hello.h"
void print_line(const char* str) {
for (int i = 0; str[i] != 0; i++) {
char c = str[i];
printf("PUT:%d - %c\n", c, c);
}
// str++;
printf("puts:%s\n", str);
}