nandi/frqpublic Fork 0
36bdfc5f7539b88587f3ce83e2701a6bc844f191
Commits
Clone
git clone https://git.rickub.com/nandi/frq.git
git clone ssh://git@rickub.com/nandi/frq.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

main_nim.cljd · 35 lines · 1.5 KBText Blame HistoryRaw
Nim under the existing UI, not instead of it 56551a8 nandi yesterday1(ns frq.main-nim
2 "The real app, with the Nim core underneath it.
3
4 `frq.main` with one line changed: `frq.net.nim/install!` where it says
5 `frq.net.dart/install!`. Everything else is shared with it — `bind!` and
6 `start!` are its own, the screens are `common/frq/screens/`, the state is
7 `frq.cells`, the actions are `frq.actions`. Nothing was reimplemented and
8 nothing was moved.
9
10 A second entry namespace rather than a flag inside `frq.main`, for the
11 reason `frq.main-web` is one: `clojure -M:cljd compile` walks out from a
12 single namespace, so what `frq.main` requires is what every target compiles.
13 `frq.net.nim` reaches `package:frq_core`, which is `dart:ffi`, which the web
14 target has no library for — requiring it from `frq.main` would break the
15 build that works to serve the one being tried.
16
17 Built as `flutter build linux -t lib/main_nim_app.dart`; see `just nim-app`."
18 (:require ["package:path_provider/path_provider.dart" :as pp]
19 [frq.main :as app]
20 [frq.io :as _io]
21 [frq.io.dart :as host]
22 [frq.net.nim :as net-nim]
23 [frq.oauth.dart :as oauth-dart]
24 [frq.atproto.dart :as atproto-dart]
25 [frq.pictures.dart :as pictures-dart]))
26
27(defn ^:async main []
28 (app/bind!)
29 (host/install! (.-path (await (pp/getApplicationSupportDirectory))))
30 ;; The one line that differs from `frq.main/main`.
31 (net-nim/install!)
32 (oauth-dart/install!)
33 (atproto-dart/install!)
34 (pictures-dart/install!)
35 (await (app/start!)))