nandi/vflutter_ffipublic Fork 0
81540bbed5044d569fccbcb6c081878d54bbbd5b
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 81540bbed5044d569fccbcb6c081878d54bbbd5b · nandi · 14h ago
main_test.dart · 14 lines · 489 BDart Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
import 'package:vflutter_ffi/vflutter_ffi.dart' as v;

Future<void> main() async {
  print('add(20, 22)      = ${v.add(20, 22)}');
  print('greet("Flutter") = ${v.greet("Flutter")}');
  print('greetAsync       = ${await v.greetAsync("isolate")}');

  // Ownership check: if greet() leaked or double-freed V memory,
  // a few thousand round trips would surface it.
  for (var i = 0; i < 20000; i++) {
    v.greet('stress$i');
  }
  print('20k round trips   = OK (no leak/double-free)');
}