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

justfile · 54 lines · 1.7 KBMakefile Blame HistoryRaw
Add a justfile f7c3825 nandithebull 4h ago1# vflutter_ffi — V logic, Flutter front end.
2#
3# Flutter is not assumed to be on PATH: set FLUTTER_BIN if yours lives
4# somewhere other than ~/flutter/bin.
5
6flutter_bin := env_var_or_default("FLUTTER_BIN", env_var("HOME") / "flutter/bin")
7flutter := flutter_bin / "flutter"
8lib_path := justfile_directory() / "build"
9
10_default:
11 @just --list
12
13# Run the Mandelbrot explorer.
14mandelbrot: build
15 cd example && PATH="{{flutter_bin}}:$PATH" {{flutter}} run -d linux
16
17# Alias: the example app is the Mandelbrot explorer.
18run: mandelbrot
19
20# Build the host V library into build/ (-gc none -prod) and check its exports.
21build:
22 ./tool/build.sh
23
24# Compile the V source to C for iOS/macOS. Run after editing src/vflutter.v.
25gen-ios:
26 ./tool/gen_ios_sources.sh
27
28# Analyze and test the example. Needs the host library for the FFI calls.
29test: build
30 cd example && PATH="{{flutter_bin}}:$PATH" {{flutter}} analyze
31 cd example && LD_LIBRARY_PATH="{{lib_path}}" PATH="{{flutter_bin}}:$PATH" {{flutter}} test
32
33# V vs Dart timings for the same frame (AOT, so it matches a release app).
34bench: build
35 dart compile exe example/lib/fractal_bench.dart -o /tmp/vflutter_bench
36 LD_LIBRARY_PATH="{{lib_path}}" /tmp/vflutter_bench
37
38# String round-trip and isolate dispatch. No Flutter SDK required.
39smoke: build
40 LD_LIBRARY_PATH="{{lib_path}}" dart example/lib/main_test.dart
41
42# RSS regression guard for the -gc none ownership rule. No Flutter SDK required.
43memcheck: build
44 LD_LIBRARY_PATH="{{lib_path}}" dart example/lib/memory_check.dart
45
46# Release build of the example.
47release: build
48 cd example && PATH="{{flutter_bin}}:$PATH" {{flutter}} build linux --release
49
50# Everything CI would run.
51ci: build smoke memcheck test bench
52
53clean:
54 rm -rf build example/build