nandi/vflutter_ffipublic Fork 0
0ed90f39e1f4dc334e577e5b38316674a53fc88d
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 · 59 lines · 2.0 KBMakefile Blame HistoryRaw
Add a justfile f7c3825 nandithebull 5h 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
Raise the isolate ceiling to 32, and add the sweep that justifies it 59a731a nandithebull 5h ago38# Sweep the isolate count to find the best band split for this machine.
39sweep: build
40 dart compile exe example/lib/tile_sweep.dart -o /tmp/vflutter_sweep
41 LD_LIBRARY_PATH="{{lib_path}}" /tmp/vflutter_sweep
42
Add a justfile f7c3825 nandithebull 5h ago43# String round-trip and isolate dispatch. No Flutter SDK required.
44smoke: build
45 LD_LIBRARY_PATH="{{lib_path}}" dart example/lib/main_test.dart
46
47# RSS regression guard for the -gc none ownership rule. No Flutter SDK required.
48memcheck: build
49 LD_LIBRARY_PATH="{{lib_path}}" dart example/lib/memory_check.dart
50
51# Release build of the example.
52release: build
53 cd example && PATH="{{flutter_bin}}:$PATH" {{flutter}} build linux --release
54
55# Everything CI would run.
56ci: build smoke memcheck test bench
57
58clean:
59 rm -rf build example/build