nandi/vflutter_ffipublic Fork 0
ad0ccdab6e9bda61631966b5d85747e3e6d533db
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.

Initial commit: V -> Flutter FFI plugin ad0ccda · on ad0ccdab6e9bda61631966b5d85747e3e6d533db · nandi · 7h ago
vflutter.h · 30 lines · 745 BC Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// C-ABI surface of the V library. Hand-maintained; ffigen parses this.
#ifndef VFLUTTER_H
#define VFLUTTER_H

#ifdef __cplusplus
extern "C" {
#endif

#if defined(_WIN32)
  #define VF_API __declspec(dllexport)
#else
  #define VF_API __attribute__((visibility("default")))
#endif

// Idempotent. Safe to call from any isolate; required only on platforms
// where the ELF/Mach-O constructor may not have run (iOS static archives).
VF_API void vf_init(void);

VF_API int vf_add(int a, int b);

// Returns a NUL-terminated string allocated by V. Caller MUST release it
// with vf_free. Never free it with Dart's calloc/malloc.
VF_API char *vf_greet(const char *name);

VF_API void vf_free(void *p);

#ifdef __cplusplus
}
#endif
#endif // VFLUTTER_H