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

build.sh · 25 lines · 1.0 KBBash Blame HistoryRaw
Initial commit: V -> Flutter FFI plugin ad0ccda nandi yesterday1#!/usr/bin/env bash
2# Host build + smoke test. CI entry point; not used by Flutter itself.
3set -euo pipefail
4cd "$(dirname "$0")/.."
Replace V with Nim 472eb49 nandithebull 20h ago5
6nim_bin="${NIM:-nim}"
7command -v "$nim_bin" >/dev/null || {
8 echo "Nim compiler not on PATH (set NIM=/path/to/nim)"; exit 1; }
9
Initial commit: V -> Flutter FFI plugin ad0ccda nandi yesterday10mkdir -p build
Replace V with Nim 472eb49 nandithebull 20h ago11
12# --mm:arc, not the default ORC: this library hands raw pointers to Dart and
13# frees them on request, so there are no cycles to collect and no reason to
14# pay for a cycle detector. -d:danger drops runtime checks the C ABI cannot
15# report anyway, and turns on the optimiser — without it the numeric kernels
16# run several times slower.
17#
18# --threads:on because Dart calls in from many isolates, each its own OS
19# thread; --noMain because the host program owns main(), not Nim.
20"$nim_bin" c --app:lib --mm:arc -d:danger --threads:on --noMain \
21 -o:build/libnimflutter.so src/nimflutter.nim
22
23echo "built: $(stat -c%s build/libnimflutter.so) bytes"
24nm -D --defined-only build/libnimflutter.so | grep ' nf_' || {
25 echo "no nf_ exports!"; exit 1; }