| The binding is Dart, and it works f7aea3b nandi 12h ago | 1 | # The Dart side |
| 2 | |
| 3 | Packages that are Dart rather than ClojureDart, and are not Flutter. |
| 4 | |
| 5 | ## Why this is a separate tree |
| 6 | |
| 7 | `frq_core` is the binding to the Nim core in `nim/`. It is `dart:ffi` and |
| 8 | `dart:convert` and nothing else, and keeping it out of `flutter/` buys two |
| 9 | things: |
| 10 | |
| 11 | * **It tests on the plain Dart VM.** `flutter/pubspec.yaml` depends on the |
| 12 | Flutter SDK, so `dart pub get` cannot resolve it at all — anything living |
| 13 | there needs a Flutter toolchain to run one assertion about a string. This |
| 14 | package resolves and tests in a second. `just dart-test`. |
| 15 | * **It says which way the dependency goes.** The Flutter app depends on this |
| 16 | by path. Nothing here may depend on Flutter, and if that ever becomes |
| 17 | tempting the thing being written belongs on the other side of the line. |
| 18 | |
| 19 | ## Why Dart and not ClojureDart |
| 20 | |
| 21 | The Nim core exists to have less Clojure in the tree. Writing its binding in |
| 22 | ClojureDart would have added some — and would have meant fighting generic |
| 23 | interop for a file that is pure marshalling, since `lookupFunction` takes two |
| 24 | type arguments. In Dart it is a typedef. |
| 25 | |
| 26 | So the shape the migration moves toward: Nim owns the rules, Dart owns the |
| 27 | platform, and ClojureDart shrinks from both ends. |