nandi/vflutter_ffipublic Fork 0
7fdf71219e3dd44c76c7be4120ff73a31d6237ce
Commits
Clone
git clone https://git.rickub.com/nandi/vflutter_ffi.git
git clone ssh://git@rickub.com/nandi/vflutter_ffi.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

vflutter.h · 30 lines · 745 BC Blame HistoryRaw
Initial commit: V -> Flutter FFI plugin ad0ccda nandi 10h ago1// C-ABI surface of the V library. Hand-maintained; ffigen parses this.
2#ifndef VFLUTTER_H
3#define VFLUTTER_H
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9#if defined(_WIN32)
10 #define VF_API __declspec(dllexport)
11#else
12 #define VF_API __attribute__((visibility("default")))
13#endif
14
15// Idempotent. Safe to call from any isolate; required only on platforms
16// where the ELF/Mach-O constructor may not have run (iOS static archives).
17VF_API void vf_init(void);
18
19VF_API int vf_add(int a, int b);
20
21// Returns a NUL-terminated string allocated by V. Caller MUST release it
22// with vf_free. Never free it with Dart's calloc/malloc.
23VF_API char *vf_greet(const char *name);
24
25VF_API void vf_free(void *p);
26
27#ifdef __cplusplus
28}
29#endif
30#endif // VFLUTTER_H