ffi example (from official lake repository (leanprover/lean4))

This commit is contained in:
qwjyh 2024-10-25 16:47:35 +09:00
parent 57fb134506
commit 3183a106c5
6 changed files with 41 additions and 2 deletions

2
c/.clangd Normal file
View file

@ -0,0 +1,2 @@
CompileFlags:
Add: [-I/home/qwjyh/.elan/toolchains/stable/include/]

8
c/ffi.cpp Normal file
View file

@ -0,0 +1,8 @@
#include <cstdint>
#include <lean/lean.h>
#include <curl/curl.h>
extern "C" uint32_t my_add(uint32_t a, uint32_t b) {
return a + b;
}