Paint frq with jvui, and take the last Rust out of the window
glimmer-vidya painted through libvidya, which meant jolt-native's Cargo workspace, which meant a build. glimmer-jvui paints through jvui — dvui's shape written in jolt on SDL3, with no shared object of its own — so the window is jolt and C and nothing else. The alias moves with it: `vidya/` reads as a lie once nothing here is vidya, so it is `gui/` in all four namespaces that call it. Every call site is otherwise unchanged, which is what the backend being built to glimmer-vidya's surface bought. libvidya leaves the closure. libjolttui stays and is now the only object out of that workspace frq loads at all — `just tui` and nothing else. What arrives instead is SDL3, SDL3_ttf and SDL3_image, which jvui declares itself and dlopens by soname. sdl3-image keeps its library in a separate `lib` output; the default one holds only share/, which cost an afternoon once and is written down in the flake so it does not cost a second. TWO paths for one dependency: glimmer-jvui's deps.edn names jvui by :local/root, a relative path that means nothing once nix has copied the subtree out, so the -Sdeps has to name both. Running it found the bug that reading it would not have. frq computes its layout from `(long (second (screen-size)))` on the first tick, which runs BEFORE the window opens — and screen-size answered nil there, which is a NullPointerException in the caller rather than a small first frame. It answers [0 0] now, the way window-width already did, and is right on the next tick. Verified: `just tui --headless` renders the sign-in screen, and the window itself runs five minutes under SDL's dummy video driver with no exception. Not verified: what it LOOKS like. There is no display here, so nobody has seen frq painted by jvui — the tags are all present and the pixel tests pass for the ones with a colour, but spacing, wrapping and the feel of it want an eye. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
77963dc parent: 231b9d3 modified
deps.edn +16 -13 | @@ -1,7 +1,11 @@ | ||
| 1 | 1 | {:paths ["src"] |
| 2 | 2 | |
| 3 | 3 | ;; glimmer owns the reactive half (ratom, components, reconciler); |
| 4 | - ;; glimmer-vidya paints it as Vidya/egui through libvidya's retained-tree ABI. | |
| 4 | + ;; glimmer-jvui paints it as jvui, which is dvui's shape written in jolt on | |
| 5 | + ;; SDL3 — no shared object of its own, and no Rust anywhere under the UI. | |
| 6 | + ;; That is the whole reason for the switch off glimmer-vidya: libvidya meant | |
| 7 | + ;; jolt-native's Cargo workspace, and a Cargo workspace meant a build. | |
| 8 | + ;; | |
| 5 | 9 | ;; Our fork of glimmer, until the reconciler fixes in it land upstream. A |
| 6 | 10 | ;; component unmounted between a cell firing and the queued render running |
| 7 | 11 | ;; used to render anyway, into widgets the backend had already freed and |
| @@ -10,15 +14,17 @@ | ||
| 10 | 14 | ;; under it subscribed, so swapping the phone layout for the split one and |
| 11 | 15 | ;; back shredded the chat: one component's props painted onto another's |
| 12 | 16 | ;; widget. |
| 13 | - :deps {jolt-lang/glimmer {:git/url "https://gitlab.com/nandithebull/glimmer" | |
| 14 | - :git/sha "399df371c790d690fb6e4560c3d4d7f838502857"} | |
| 15 | - nandi/glimmer-vidya {:git/url "https://gitlab.com/nandithebull/jolt-native" | |
| 16 | - :git/sha "d970307ccf1fe67e2e971f2837d2282d8ba79a62" | |
| 17 | - :deps/root "glimmer-backends/glimmer-vidya"}} | |
| 17 | + :deps {jolt-lang/glimmer {:git/url "https://gitlab.com/nandithebull/glimmer" | |
| 18 | + :git/sha "399df371c790d690fb6e4560c3d4d7f838502857"} | |
| 19 | + nandi/glimmer-jvui {:git/url "https://gitlab.com/nandithebull/jolt-native" | |
| 20 | + :git/sha "99fabc1d57f0e0d0674b8ef5fbfd5960927abd38" | |
| 21 | + :deps/root "glimmer-backends/glimmer-jvui"}} | |
| 18 | 22 | |
| 19 | - ;; libvidya comes from gitlab.com/nandithebull/jolt-native: | |
| 20 | - ;; | |
| 21 | - ;; libvidya the retained-tree ABI glimmer-vidya binds, on egui | |
| 23 | + ;; What the UI loads is SDL, and jvui declares it itself — SDL3, SDL3_ttf | |
| 24 | + ;; and SDL3_image, all :optional, so the layout tests run on a machine with | |
| 25 | + ;; none of them. Nothing of jolt-native's Cargo workspace is loaded by the | |
| 26 | + ;; window any more; `just tui` still takes libjolttui, which is the one | |
| 27 | + ;; object left and only for the terminal. | |
| 22 | 28 | ;; |
| 23 | 29 | ;; Calls used to be the one thing this client could not do in jolt. The media |
| 24 | 30 | ;; half is `frq.av.plane` now — MoQ over QUIC from libmoq_ffi, Opus from |
| @@ -26,10 +32,7 @@ | ||
| 26 | 32 | ;; and ALSA. Signaling was always IRC and still lives in src/frq/av.clj. |
| 27 | 33 | ;; |
| 28 | 34 | ;; just run |
| 29 | - :jolt/native [{:name "vidya" | |
| 30 | - :darwin ["libvidya.dylib"] | |
| 31 | - :linux ["libvidya.so"]} | |
| 32 | - ;; The transport half of a call: MoQ over QUIC, the one | |
| 35 | + :jolt/native [;; The transport half of a call: MoQ over QUIC, the one | |
| 33 | 36 | ;; piece with no C implementation anywhere. Fetched from |
| 34 | 37 | ;; moq-ffi's release rather than built — building it means a |
| 35 | 38 | ;; 1062-crate workspace. |
| @@ -1,7 +1,11 @@ | |||
| 1 | {:paths ["src"] | 1 | {:paths ["src"] |
| 2 | 2 | ||
| 3 | ;; glimmer owns the reactive half (ratom, components, reconciler); | 3 | ;; glimmer owns the reactive half (ratom, components, reconciler); |
| 4 | - ;; glimmer-vidya paints it as Vidya/egui through libvidya's retained-tree ABI. | 4 | + ;; glimmer-jvui paints it as jvui, which is dvui's shape written in jolt on |
| 5 | + ;; SDL3 — no shared object of its own, and no Rust anywhere under the UI. | ||
| 6 | + ;; That is the whole reason for the switch off glimmer-vidya: libvidya meant | ||
| 7 | + ;; jolt-native's Cargo workspace, and a Cargo workspace meant a build. | ||
| 8 | + ;; | ||
| 5 | ;; Our fork of glimmer, until the reconciler fixes in it land upstream. A | 9 | ;; Our fork of glimmer, until the reconciler fixes in it land upstream. A |
| 6 | ;; component unmounted between a cell firing and the queued render running | 10 | ;; component unmounted between a cell firing and the queued render running |
| 7 | ;; used to render anyway, into widgets the backend had already freed and | 11 | ;; used to render anyway, into widgets the backend had already freed and |
| @@ -10,15 +14,17 @@ | |||
| 10 | ;; under it subscribed, so swapping the phone layout for the split one and | 14 | ;; under it subscribed, so swapping the phone layout for the split one and |
| 11 | ;; back shredded the chat: one component's props painted onto another's | 15 | ;; back shredded the chat: one component's props painted onto another's |
| 12 | ;; widget. | 16 | ;; widget. |
| 13 | - :deps {jolt-lang/glimmer {:git/url "https://gitlab.com/nandithebull/glimmer" | 17 | + :deps {jolt-lang/glimmer {:git/url "https://gitlab.com/nandithebull/glimmer" |
| 14 | - :git/sha "399df371c790d690fb6e4560c3d4d7f838502857"} | 18 | + :git/sha "399df371c790d690fb6e4560c3d4d7f838502857"} |
| 15 | - nandi/glimmer-vidya {:git/url "https://gitlab.com/nandithebull/jolt-native" | 19 | + nandi/glimmer-jvui {:git/url "https://gitlab.com/nandithebull/jolt-native" |
| 16 | - :git/sha "d970307ccf1fe67e2e971f2837d2282d8ba79a62" | 20 | + :git/sha "99fabc1d57f0e0d0674b8ef5fbfd5960927abd38" |
| 17 | - :deps/root "glimmer-backends/glimmer-vidya"}} | 21 | + :deps/root "glimmer-backends/glimmer-jvui"}} |
| 18 | 22 | ||
| 19 | - ;; libvidya comes from gitlab.com/nandithebull/jolt-native: | 23 | + ;; What the UI loads is SDL, and jvui declares it itself — SDL3, SDL3_ttf |
| 20 | - ;; | 24 | + ;; and SDL3_image, all :optional, so the layout tests run on a machine with |
| 21 | - ;; libvidya the retained-tree ABI glimmer-vidya binds, on egui | 25 | + ;; none of them. Nothing of jolt-native's Cargo workspace is loaded by the |
| 26 | + ;; window any more; `just tui` still takes libjolttui, which is the one | ||
| 27 | + ;; object left and only for the terminal. | ||
| 22 | ;; | 28 | ;; |
| 23 | ;; Calls used to be the one thing this client could not do in jolt. The media | 29 | ;; Calls used to be the one thing this client could not do in jolt. The media |
| 24 | ;; half is `frq.av.plane` now — MoQ over QUIC from libmoq_ffi, Opus from | 30 | ;; half is `frq.av.plane` now — MoQ over QUIC from libmoq_ffi, Opus from |
| @@ -26,10 +32,7 @@ | |||
| 26 | ;; and ALSA. Signaling was always IRC and still lives in src/frq/av.clj. | 32 | ;; and ALSA. Signaling was always IRC and still lives in src/frq/av.clj. |
| 27 | ;; | 33 | ;; |
| 28 | ;; just run | 34 | ;; just run |
| 29 | - :jolt/native [{:name "vidya" | 35 | + :jolt/native [;; The transport half of a call: MoQ over QUIC, the one |
| 30 | - :darwin ["libvidya.dylib"] | ||
| 31 | - :linux ["libvidya.so"]} | ||
| 32 | - ;; The transport half of a call: MoQ over QUIC, the one | ||
| 33 | ;; piece with no C implementation anywhere. Fetched from | 36 | ;; piece with no C implementation anywhere. Fetched from |
| 34 | ;; moq-ffi's release rather than built — building it means a | 37 | ;; moq-ffi's release rather than built — building it means a |
| 35 | ;; 1062-crate workspace. | 38 | ;; 1062-crate workspace. |
modified
flake.lock +6 -6 | @@ -155,16 +155,16 @@ | ||
| 155 | 155 | "rust-overlay": "rust-overlay" |
| 156 | 156 | }, |
| 157 | 157 | "locked": { |
| 158 | - "lastModified": 1789042358, | |
| 159 | - "narHash": "sha256-n8YSOGKVI9/keASnprfVK/Sd0K+b4IigHLvtRkyi9+8=", | |
| 158 | + "lastModified": 1789045157, | |
| 159 | + "narHash": "sha256-27upQriZInnCZls1Ir6IzS8QuAcO/C0Yy2ZRN9cUHow=", | |
| 160 | 160 | "ref": "refs/heads/main", |
| 161 | - "rev": "2975a4318cc748dd0ee25d6cef64f29c87bb1cf7", | |
| 162 | - "revCount": 65, | |
| 161 | + "rev": "99fabc1d57f0e0d0674b8ef5fbfd5960927abd38", | |
| 162 | + "revCount": 77, | |
| 163 | 163 | "type": "git", |
| 164 | 164 | "url": "https://gitlab.com/nandithebull/jolt-native" |
| 165 | 165 | }, |
| 166 | 166 | "original": { |
| 167 | - "rev": "2975a4318cc748dd0ee25d6cef64f29c87bb1cf7", | |
| 167 | + "rev": "99fabc1d57f0e0d0674b8ef5fbfd5960927abd38", | |
| 168 | 168 | "type": "git", |
| 169 | 169 | "url": "https://gitlab.com/nandithebull/jolt-native" |
| 170 | 170 | } |
| @@ -172,7 +172,7 @@ | ||
| 172 | 172 | "jolt-native-android": { |
| 173 | 173 | "flake": false, |
| 174 | 174 | "locked": { |
| 175 | - "lastModified": 1788844464, | |
| 175 | + "lastModified": 1789018716, | |
| 176 | 176 | "narHash": "sha256-HgVSQR2XiS3De/gP9Z1JZ2Tqj4yPzzN6mx2Xyp6DuRg=", |
| 177 | 177 | "type": "tarball", |
| 178 | 178 | "url": "https://gitlab.com/api/v4/projects/nandithebull%2Fjolt-native/packages/generic/jolt-native/latest/android-arm64-v8a.tar.gz" |
| @@ -155,16 +155,16 @@ | |||
| 155 | "rust-overlay": "rust-overlay" | 155 | "rust-overlay": "rust-overlay" |
| 156 | }, | 156 | }, |
| 157 | "locked": { | 157 | "locked": { |
| 158 | - "lastModified": 1789042358, | 158 | + "lastModified": 1789045157, |
| 159 | - "narHash": "sha256-n8YSOGKVI9/keASnprfVK/Sd0K+b4IigHLvtRkyi9+8=", | 159 | + "narHash": "sha256-27upQriZInnCZls1Ir6IzS8QuAcO/C0Yy2ZRN9cUHow=", |
| 160 | "ref": "refs/heads/main", | 160 | "ref": "refs/heads/main", |
| 161 | - "rev": "2975a4318cc748dd0ee25d6cef64f29c87bb1cf7", | 161 | + "rev": "99fabc1d57f0e0d0674b8ef5fbfd5960927abd38", |
| 162 | - "revCount": 65, | 162 | + "revCount": 77, |
| 163 | "type": "git", | 163 | "type": "git", |
| 164 | "url": "https://gitlab.com/nandithebull/jolt-native" | 164 | "url": "https://gitlab.com/nandithebull/jolt-native" |
| 165 | }, | 165 | }, |
| 166 | "original": { | 166 | "original": { |
| 167 | - "rev": "2975a4318cc748dd0ee25d6cef64f29c87bb1cf7", | 167 | + "rev": "99fabc1d57f0e0d0674b8ef5fbfd5960927abd38", |
| 168 | "type": "git", | 168 | "type": "git", |
| 169 | "url": "https://gitlab.com/nandithebull/jolt-native" | 169 | "url": "https://gitlab.com/nandithebull/jolt-native" |
| 170 | } | 170 | } |
| @@ -172,7 +172,7 @@ | |||
| 172 | "jolt-native-android": { | 172 | "jolt-native-android": { |
| 173 | "flake": false, | 173 | "flake": false, |
| 174 | "locked": { | 174 | "locked": { |
| 175 | - "lastModified": 1788844464, | 175 | + "lastModified": 1789018716, |
| 176 | "narHash": "sha256-HgVSQR2XiS3De/gP9Z1JZ2Tqj4yPzzN6mx2Xyp6DuRg=", | 176 | "narHash": "sha256-HgVSQR2XiS3De/gP9Z1JZ2Tqj4yPzzN6mx2Xyp6DuRg=", |
| 177 | "type": "tarball", | 177 | "type": "tarball", |
| 178 | "url": "https://gitlab.com/api/v4/projects/nandithebull%2Fjolt-native/packages/generic/jolt-native/latest/android-arm64-v8a.tar.gz" | 178 | "url": "https://gitlab.com/api/v4/projects/nandithebull%2Fjolt-native/packages/generic/jolt-native/latest/android-arm64-v8a.tar.gz" |
modified
flake.nix +28 -13 | @@ -46,9 +46,10 @@ | ||
| 46 | 46 | # |
| 47 | 47 | # Pinned all the same, and pinned to a rev: this input carries both halves of |
| 48 | 48 | # glimmer-vidya — libvidya, and the Jolt side that binds it — so an |
| 49 | - # Pinned to `no-moq-deps`, which is the rev below plus one commit: it | |
| 50 | - # splits jolt-native's dependency artifact by consumer, so asking for | |
| 51 | - # libvidya and libjolttui no longer builds jolt-moq's 394 crates. It is | |
| 49 | + # Pinned to `jvui-for-frq`: it | |
| 50 | + # carries jvui and glimmer-jvui — the toolkit the window is painted with | |
| 51 | + # now — and, merged in from no-moq-deps, the dependency split and the | |
| 52 | + # JOLT_WITHOUT_MOQ guard on the Android glue. It is | |
| 52 | 53 | # branched from the rev this used to name rather than taken off main, |
| 53 | 54 | # because main has moved on to the Zig/dvui backend and a UI change is |
| 54 | 55 | # not what this pin is for. |
| @@ -63,7 +64,7 @@ | ||
| 63 | 64 | # drift this comment warns about wearing a different hat: one input, and |
| 64 | 65 | # the window and the terminal are the same library either way. |
| 65 | 66 | jolt-native = { |
| 66 | - url = "git+https://gitlab.com/nandithebull/jolt-native?rev=2975a4318cc748dd0ee25d6cef64f29c87bb1cf7"; | |
| 67 | + url = "git+https://gitlab.com/nandithebull/jolt-native?rev=99fabc1d57f0e0d0674b8ef5fbfd5960927abd38"; | |
| 67 | 68 | inputs.nixpkgs.follows = "nixpkgs"; |
| 68 | 69 | }; |
| 69 | 70 | |
| @@ -187,9 +188,10 @@ | ||
| 187 | 188 | # and says it once. It also builds cpal with the `pipewire` feature, |
| 188 | 189 | # which the restatement did not — so device names in a call are |
| 189 | 190 | # PipeWire's rather than raw ALSA PCMs. |
| 190 | - # libvidya and libjolttui, NOT libjoltmoq. Its `default` is all | |
| 191 | - # three joined, and the third is the Rust media plane frq no | |
| 192 | - # longer loads — `frq.av.plane` replaced it. | |
| 191 | + # libjolttui only. Not libjoltmoq, whose job `frq.av.plane` does | |
| 192 | + # now, and no longer libvidya either: the window is jvui on SDL, | |
| 193 | + # so the only object left out of that Cargo workspace is the | |
| 194 | + # terminal backend, and only `just tui` loads it. | |
| 193 | 195 | # |
| 194 | 196 | # This makes the closure smaller and the APK smaller. It does NOT |
| 195 | 197 | # make the build shorter, and it is worth being exact about why: |
| @@ -204,7 +206,7 @@ | ||
| 204 | 206 | let np = jolt-native.packages.${pkgs.stdenv.hostPlatform.system}; |
| 205 | 207 | in pkgs.symlinkJoin { |
| 206 | 208 | name = "jolt-native-ui"; |
| 207 | - paths = [ np.libvidya np.libjolttui ]; | |
| 209 | + paths = [ np.libjolttui ]; | |
| 208 | 210 | }; |
| 209 | 211 | |
| 210 | 212 | # libmoq_ffi — MoQ over QUIC behind UniFFI's C ABI, FETCHED rather |
| @@ -302,7 +304,14 @@ | ||
| 302 | 304 | # openh264 is here for frqH264's DT_NEEDED; alsa-lib for capture |
| 303 | 305 | # and playback. V4L2 needs nothing: it is ioctls against libc and |
| 304 | 306 | # the kernel, so there is no library to name. |
| 305 | - codecs = [ pkgs.libopus pkgs.openh264 frqH264 pkgs.alsa-lib ]; | |
| 307 | + # SDL is what the UI is now: jvui declares SDL3, SDL3_ttf and | |
| 308 | + # SDL3_image in its own :jolt/native and dlopens them by soname, | |
| 309 | + # so they have to be somewhere the loader looks. sdl3-image keeps | |
| 310 | + # its library in a separate `lib` output — the default one holds | |
| 311 | + # only share/, which is an afternoon nobody needs to repeat. | |
| 312 | + sdl = [ pkgs.sdl3 pkgs.sdl3-ttf (pkgs.sdl3-image.lib or pkgs.sdl3-image) ]; | |
| 313 | + | |
| 314 | + codecs = [ pkgs.libopus pkgs.openh264 frqH264 pkgs.alsa-lib ] ++ sdl; | |
| 306 | 315 | |
| 307 | 316 | # ALSA's PipeWire plugin, which is how `default` resolves to |
| 308 | 317 | # anything on a machine running PipeWire — and every machine frq |
| @@ -374,7 +383,12 @@ | ||
| 374 | 383 | # glimmer-vidya lives inside the jolt-native checkout, and its own |
| 375 | 384 | # deps.edn asks for glimmer by git — the top-level override below |
| 376 | 385 | # answers for both. |
| 377 | - glimmerVidya = "${jolt-native}/glimmer-backends/glimmer-vidya"; | |
| 386 | + # glimmer-jvui and the toolkit it is a backend for. TWO paths and | |
| 387 | + # not one: glimmer-jvui's own deps.edn names jvui by :local/root, | |
| 388 | + # a relative path that means nothing once nix has copied the | |
| 389 | + # subtree, so the -Sdeps below has to name both. | |
| 390 | + glimmerJvui = "${jolt-native}/glimmer-backends/glimmer-jvui"; | |
| 391 | + jvui = "${jolt-native}/jvui"; | |
| 378 | 392 | glimmerTui = "${jolt-native}/glimmer-backends/glimmer-tui"; |
| 379 | 393 | |
| 380 | 394 | runtimeLibs = runtimeLibsFor pkgs; |
| @@ -401,7 +415,7 @@ | ||
| 401 | 415 | [ -e /run/current-system ] || runner="${nixGL}/bin/nixGLIntel" |
| 402 | 416 | |
| 403 | 417 | exec ''${runner} ${joltRuntime}/bin/jolt \ |
| 404 | - -Sdeps '{:deps {jolt-lang/glimmer {:local/root "${glimmer}"} nandi/glimmer-vidya {:local/root "${glimmerVidya}"}}}' \ | |
| 418 | + -Sdeps '{:deps {jolt-lang/glimmer {:local/root "${glimmer}"} nandi/glimmer-jvui {:local/root "${glimmerJvui}"} jvui/jvui {:local/root "${jvui}"}}}' \ | |
| 405 | 419 | -M:frq "$@" |
| 406 | 420 | ''; |
| 407 | 421 | |
| @@ -414,7 +428,7 @@ | ||
| 414 | 428 | cd ${frqSource} |
| 415 | 429 | |
| 416 | 430 | exec ${joltRuntime}/bin/jolt \ |
| 417 | - -Sdeps '{:deps {jolt-lang/glimmer {:local/root "${glimmer}"} nandi/glimmer-vidya {:local/root "${glimmerVidya}"} nandi/glimmer-tui {:local/root "${glimmerTui}"}}}' \ | |
| 431 | + -Sdeps '{:deps {jolt-lang/glimmer {:local/root "${glimmer}"} nandi/glimmer-jvui {:local/root "${glimmerJvui}"} jvui/jvui {:local/root "${jvui}"} nandi/glimmer-tui {:local/root "${glimmerTui}"}}}' \ | |
| 418 | 432 | -m frq.tui "$@" |
| 419 | 433 | ''; |
| 420 | 434 | |
| @@ -542,7 +556,8 @@ | ||
| 542 | 556 | # is a different `let`. See `alsaPluginDir` there for why. |
| 543 | 557 | ALSA_PLUGIN_DIR = "${pkgs.pipewire}/lib/alsa-lib"; |
| 544 | 558 | GLIMMER_SRC = glimmer; |
| 545 | - GLIMMER_VIDYA_SRC = "${jolt-native}/glimmer-backends/glimmer-vidya"; | |
| 559 | + GLIMMER_JVUI_SRC = "${jolt-native}/glimmer-backends/glimmer-jvui"; | |
| 560 | + JVUI_SRC = "${jolt-native}/jvui"; | |
| 546 | 561 | GLIMMER_TUI_SRC = "${jolt-native}/glimmer-backends/glimmer-tui"; |
| 547 | 562 | FRQ_LIB_PATH = lib.makeLibraryPath (runtimeLibsFor pkgs); |
| 548 | 563 | NIXGL = "${nixGLFor pkgs}/bin/nixGLIntel"; |
| @@ -46,9 +46,10 @@ | |||
| 46 | # | 46 | # |
| 47 | # Pinned all the same, and pinned to a rev: this input carries both halves of | 47 | # Pinned all the same, and pinned to a rev: this input carries both halves of |
| 48 | # glimmer-vidya — libvidya, and the Jolt side that binds it — so an | 48 | # glimmer-vidya — libvidya, and the Jolt side that binds it — so an |
| 49 | - # Pinned to `no-moq-deps`, which is the rev below plus one commit: it | 49 | + # Pinned to `jvui-for-frq`: it |
| 50 | - # splits jolt-native's dependency artifact by consumer, so asking for | 50 | + # carries jvui and glimmer-jvui — the toolkit the window is painted with |
| 51 | - # libvidya and libjolttui no longer builds jolt-moq's 394 crates. It is | 51 | + # now — and, merged in from no-moq-deps, the dependency split and the |
| 52 | + # JOLT_WITHOUT_MOQ guard on the Android glue. It is | ||
| 52 | # branched from the rev this used to name rather than taken off main, | 53 | # branched from the rev this used to name rather than taken off main, |
| 53 | # because main has moved on to the Zig/dvui backend and a UI change is | 54 | # because main has moved on to the Zig/dvui backend and a UI change is |
| 54 | # not what this pin is for. | 55 | # not what this pin is for. |
| @@ -63,7 +64,7 @@ | |||
| 63 | # drift this comment warns about wearing a different hat: one input, and | 64 | # drift this comment warns about wearing a different hat: one input, and |
| 64 | # the window and the terminal are the same library either way. | 65 | # the window and the terminal are the same library either way. |
| 65 | jolt-native = { | 66 | jolt-native = { |
| 66 | - url = "git+https://gitlab.com/nandithebull/jolt-native?rev=2975a4318cc748dd0ee25d6cef64f29c87bb1cf7"; | 67 | + url = "git+https://gitlab.com/nandithebull/jolt-native?rev=99fabc1d57f0e0d0674b8ef5fbfd5960927abd38"; |
| 67 | inputs.nixpkgs.follows = "nixpkgs"; | 68 | inputs.nixpkgs.follows = "nixpkgs"; |
| 68 | }; | 69 | }; |
| 69 | 70 | ||
| @@ -187,9 +188,10 @@ | |||
| 187 | # and says it once. It also builds cpal with the `pipewire` feature, | 188 | # and says it once. It also builds cpal with the `pipewire` feature, |
| 188 | # which the restatement did not — so device names in a call are | 189 | # which the restatement did not — so device names in a call are |
| 189 | # PipeWire's rather than raw ALSA PCMs. | 190 | # PipeWire's rather than raw ALSA PCMs. |
| 190 | - # libvidya and libjolttui, NOT libjoltmoq. Its `default` is all | 191 | + # libjolttui only. Not libjoltmoq, whose job `frq.av.plane` does |
| 191 | - # three joined, and the third is the Rust media plane frq no | 192 | + # now, and no longer libvidya either: the window is jvui on SDL, |
| 192 | - # longer loads — `frq.av.plane` replaced it. | 193 | + # so the only object left out of that Cargo workspace is the |
| 194 | + # terminal backend, and only `just tui` loads it. | ||
| 193 | # | 195 | # |
| 194 | # This makes the closure smaller and the APK smaller. It does NOT | 196 | # This makes the closure smaller and the APK smaller. It does NOT |
| 195 | # make the build shorter, and it is worth being exact about why: | 197 | # make the build shorter, and it is worth being exact about why: |
| @@ -204,7 +206,7 @@ | |||
| 204 | let np = jolt-native.packages.${pkgs.stdenv.hostPlatform.system}; | 206 | let np = jolt-native.packages.${pkgs.stdenv.hostPlatform.system}; |
| 205 | in pkgs.symlinkJoin { | 207 | in pkgs.symlinkJoin { |
| 206 | name = "jolt-native-ui"; | 208 | name = "jolt-native-ui"; |
| 207 | - paths = [ np.libvidya np.libjolttui ]; | 209 | + paths = [ np.libjolttui ]; |
| 208 | }; | 210 | }; |
| 209 | 211 | ||
| 210 | # libmoq_ffi — MoQ over QUIC behind UniFFI's C ABI, FETCHED rather | 212 | # libmoq_ffi — MoQ over QUIC behind UniFFI's C ABI, FETCHED rather |
| @@ -302,7 +304,14 @@ | |||
| 302 | # openh264 is here for frqH264's DT_NEEDED; alsa-lib for capture | 304 | # openh264 is here for frqH264's DT_NEEDED; alsa-lib for capture |
| 303 | # and playback. V4L2 needs nothing: it is ioctls against libc and | 305 | # and playback. V4L2 needs nothing: it is ioctls against libc and |
| 304 | # the kernel, so there is no library to name. | 306 | # the kernel, so there is no library to name. |
| 305 | - codecs = [ pkgs.libopus pkgs.openh264 frqH264 pkgs.alsa-lib ]; | 307 | + # SDL is what the UI is now: jvui declares SDL3, SDL3_ttf and |
| 308 | + # SDL3_image in its own :jolt/native and dlopens them by soname, | ||
| 309 | + # so they have to be somewhere the loader looks. sdl3-image keeps | ||
| 310 | + # its library in a separate `lib` output — the default one holds | ||
| 311 | + # only share/, which is an afternoon nobody needs to repeat. | ||
| 312 | + sdl = [ pkgs.sdl3 pkgs.sdl3-ttf (pkgs.sdl3-image.lib or pkgs.sdl3-image) ]; | ||
| 313 | + | ||
| 314 | + codecs = [ pkgs.libopus pkgs.openh264 frqH264 pkgs.alsa-lib ] ++ sdl; | ||
| 306 | 315 | ||
| 307 | # ALSA's PipeWire plugin, which is how `default` resolves to | 316 | # ALSA's PipeWire plugin, which is how `default` resolves to |
| 308 | # anything on a machine running PipeWire — and every machine frq | 317 | # anything on a machine running PipeWire — and every machine frq |
| @@ -374,7 +383,12 @@ | |||
| 374 | # glimmer-vidya lives inside the jolt-native checkout, and its own | 383 | # glimmer-vidya lives inside the jolt-native checkout, and its own |
| 375 | # deps.edn asks for glimmer by git — the top-level override below | 384 | # deps.edn asks for glimmer by git — the top-level override below |
| 376 | # answers for both. | 385 | # answers for both. |
| 377 | - glimmerVidya = "${jolt-native}/glimmer-backends/glimmer-vidya"; | 386 | + # glimmer-jvui and the toolkit it is a backend for. TWO paths and |
| 387 | + # not one: glimmer-jvui's own deps.edn names jvui by :local/root, | ||
| 388 | + # a relative path that means nothing once nix has copied the | ||
| 389 | + # subtree, so the -Sdeps below has to name both. | ||
| 390 | + glimmerJvui = "${jolt-native}/glimmer-backends/glimmer-jvui"; | ||
| 391 | + jvui = "${jolt-native}/jvui"; | ||
| 378 | glimmerTui = "${jolt-native}/glimmer-backends/glimmer-tui"; | 392 | glimmerTui = "${jolt-native}/glimmer-backends/glimmer-tui"; |
| 379 | 393 | ||
| 380 | runtimeLibs = runtimeLibsFor pkgs; | 394 | runtimeLibs = runtimeLibsFor pkgs; |
| @@ -401,7 +415,7 @@ | |||
| 401 | [ -e /run/current-system ] || runner="${nixGL}/bin/nixGLIntel" | 415 | [ -e /run/current-system ] || runner="${nixGL}/bin/nixGLIntel" |
| 402 | 416 | ||
| 403 | exec ''${runner} ${joltRuntime}/bin/jolt \ | 417 | exec ''${runner} ${joltRuntime}/bin/jolt \ |
| 404 | - -Sdeps '{:deps {jolt-lang/glimmer {:local/root "${glimmer}"} nandi/glimmer-vidya {:local/root "${glimmerVidya}"}}}' \ | 418 | + -Sdeps '{:deps {jolt-lang/glimmer {:local/root "${glimmer}"} nandi/glimmer-jvui {:local/root "${glimmerJvui}"} jvui/jvui {:local/root "${jvui}"}}}' \ |
| 405 | -M:frq "$@" | 419 | -M:frq "$@" |
| 406 | ''; | 420 | ''; |
| 407 | 421 | ||
| @@ -414,7 +428,7 @@ | |||
| 414 | cd ${frqSource} | 428 | cd ${frqSource} |
| 415 | 429 | ||
| 416 | exec ${joltRuntime}/bin/jolt \ | 430 | exec ${joltRuntime}/bin/jolt \ |
| 417 | - -Sdeps '{:deps {jolt-lang/glimmer {:local/root "${glimmer}"} nandi/glimmer-vidya {:local/root "${glimmerVidya}"} nandi/glimmer-tui {:local/root "${glimmerTui}"}}}' \ | 431 | + -Sdeps '{:deps {jolt-lang/glimmer {:local/root "${glimmer}"} nandi/glimmer-jvui {:local/root "${glimmerJvui}"} jvui/jvui {:local/root "${jvui}"} nandi/glimmer-tui {:local/root "${glimmerTui}"}}}' \ |
| 418 | -m frq.tui "$@" | 432 | -m frq.tui "$@" |
| 419 | ''; | 433 | ''; |
| 420 | 434 | ||
| @@ -542,7 +556,8 @@ | |||
| 542 | # is a different `let`. See `alsaPluginDir` there for why. | 556 | # is a different `let`. See `alsaPluginDir` there for why. |
| 543 | ALSA_PLUGIN_DIR = "${pkgs.pipewire}/lib/alsa-lib"; | 557 | ALSA_PLUGIN_DIR = "${pkgs.pipewire}/lib/alsa-lib"; |
| 544 | GLIMMER_SRC = glimmer; | 558 | GLIMMER_SRC = glimmer; |
| 545 | - GLIMMER_VIDYA_SRC = "${jolt-native}/glimmer-backends/glimmer-vidya"; | 559 | + GLIMMER_JVUI_SRC = "${jolt-native}/glimmer-backends/glimmer-jvui"; |
| 560 | + JVUI_SRC = "${jolt-native}/jvui"; | ||
| 546 | GLIMMER_TUI_SRC = "${jolt-native}/glimmer-backends/glimmer-tui"; | 561 | GLIMMER_TUI_SRC = "${jolt-native}/glimmer-backends/glimmer-tui"; |
| 547 | FRQ_LIB_PATH = lib.makeLibraryPath (runtimeLibsFor pkgs); | 562 | FRQ_LIB_PATH = lib.makeLibraryPath (runtimeLibsFor pkgs); |
| 548 | NIXGL = "${nixGLFor pkgs}/bin/nixGLIntel"; | 563 | NIXGL = "${nixGLFor pkgs}/bin/nixGLIntel"; |
modified
justfile +8 -4 | @@ -125,7 +125,8 @@ run *args: | ||
| 125 | 125 | # input that was built rather than deps.edn's git sha — the pin drifting |
| 126 | 126 | # from the library is exactly what the flake input's comment describes. |
| 127 | 127 | deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}" |
| 128 | - deps="$deps nandi/glimmer-vidya {:local/root \"$GLIMMER_VIDYA_SRC\"}}}" | |
| 128 | + deps="$deps nandi/glimmer-jvui {:local/root \"$GLIMMER_JVUI_SRC\"}" | |
| 129 | + deps="$deps jvui/jvui {:local/root \"$JVUI_SRC\"}}}" | |
| 129 | 130 | |
| 130 | 131 | export LD_LIBRARY_PATH="$JOLT_NATIVE_LIB:$FRQ_LIB_PATH${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" |
| 131 | 132 | |
| @@ -154,7 +155,8 @@ tui *args: | ||
| 154 | 155 | fi |
| 155 | 156 | |
| 156 | 157 | deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}" |
| 157 | - deps="$deps nandi/glimmer-vidya {:local/root \"$GLIMMER_VIDYA_SRC\"}" | |
| 158 | + deps="$deps nandi/glimmer-jvui {:local/root \"$GLIMMER_JVUI_SRC\"}" | |
| 159 | + deps="$deps jvui/jvui {:local/root \"$JVUI_SRC\"}" | |
| 158 | 160 | deps="$deps nandi/glimmer-tui {:local/root \"$GLIMMER_TUI_SRC\"}}}" |
| 159 | 161 | |
| 160 | 162 | export LD_LIBRARY_PATH="$JOLT_NATIVE_LIB${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" |
| @@ -181,7 +183,8 @@ nrepl *args: | ||
| 181 | 183 | fi |
| 182 | 184 | |
| 183 | 185 | deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}" |
| 184 | - deps="$deps nandi/glimmer-vidya {:local/root \"$GLIMMER_VIDYA_SRC\"}" | |
| 186 | + deps="$deps nandi/glimmer-jvui {:local/root \"$GLIMMER_JVUI_SRC\"}" | |
| 187 | + deps="$deps jvui/jvui {:local/root \"$JVUI_SRC\"}" | |
| 185 | 188 | deps="$deps nandi/glimmer-tui {:local/root \"$GLIMMER_TUI_SRC\"}}}" |
| 186 | 189 | |
| 187 | 190 | export LD_LIBRARY_PATH="$JOLT_NATIVE_LIB:$FRQ_LIB_PATH${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" |
| @@ -204,7 +207,8 @@ repl *args: | ||
| 204 | 207 | fi |
| 205 | 208 | |
| 206 | 209 | deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}" |
| 207 | - deps="$deps nandi/glimmer-vidya {:local/root \"$GLIMMER_VIDYA_SRC\"}}}" | |
| 210 | + deps="$deps nandi/glimmer-jvui {:local/root \"$GLIMMER_JVUI_SRC\"}" | |
| 211 | + deps="$deps jvui/jvui {:local/root \"$JVUI_SRC\"}}}" | |
| 208 | 212 | |
| 209 | 213 | export LD_LIBRARY_PATH="$JOLT_NATIVE_LIB:$FRQ_LIB_PATH${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" |
| 210 | 214 | |
| @@ -125,7 +125,8 @@ run *args: | |||
| 125 | # input that was built rather than deps.edn's git sha — the pin drifting | 125 | # input that was built rather than deps.edn's git sha — the pin drifting |
| 126 | # from the library is exactly what the flake input's comment describes. | 126 | # from the library is exactly what the flake input's comment describes. |
| 127 | deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}" | 127 | deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}" |
| 128 | - deps="$deps nandi/glimmer-vidya {:local/root \"$GLIMMER_VIDYA_SRC\"}}}" | 128 | + deps="$deps nandi/glimmer-jvui {:local/root \"$GLIMMER_JVUI_SRC\"}" |
| 129 | + deps="$deps jvui/jvui {:local/root \"$JVUI_SRC\"}}}" | ||
| 129 | 130 | ||
| 130 | export LD_LIBRARY_PATH="$JOLT_NATIVE_LIB:$FRQ_LIB_PATH${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" | 131 | export LD_LIBRARY_PATH="$JOLT_NATIVE_LIB:$FRQ_LIB_PATH${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" |
| 131 | 132 | ||
| @@ -154,7 +155,8 @@ tui *args: | |||
| 154 | fi | 155 | fi |
| 155 | 156 | ||
| 156 | deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}" | 157 | deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}" |
| 157 | - deps="$deps nandi/glimmer-vidya {:local/root \"$GLIMMER_VIDYA_SRC\"}" | 158 | + deps="$deps nandi/glimmer-jvui {:local/root \"$GLIMMER_JVUI_SRC\"}" |
| 159 | + deps="$deps jvui/jvui {:local/root \"$JVUI_SRC\"}" | ||
| 158 | deps="$deps nandi/glimmer-tui {:local/root \"$GLIMMER_TUI_SRC\"}}}" | 160 | deps="$deps nandi/glimmer-tui {:local/root \"$GLIMMER_TUI_SRC\"}}}" |
| 159 | 161 | ||
| 160 | export LD_LIBRARY_PATH="$JOLT_NATIVE_LIB${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" | 162 | export LD_LIBRARY_PATH="$JOLT_NATIVE_LIB${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" |
| @@ -181,7 +183,8 @@ nrepl *args: | |||
| 181 | fi | 183 | fi |
| 182 | 184 | ||
| 183 | deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}" | 185 | deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}" |
| 184 | - deps="$deps nandi/glimmer-vidya {:local/root \"$GLIMMER_VIDYA_SRC\"}" | 186 | + deps="$deps nandi/glimmer-jvui {:local/root \"$GLIMMER_JVUI_SRC\"}" |
| 187 | + deps="$deps jvui/jvui {:local/root \"$JVUI_SRC\"}" | ||
| 185 | deps="$deps nandi/glimmer-tui {:local/root \"$GLIMMER_TUI_SRC\"}}}" | 188 | deps="$deps nandi/glimmer-tui {:local/root \"$GLIMMER_TUI_SRC\"}}}" |
| 186 | 189 | ||
| 187 | export LD_LIBRARY_PATH="$JOLT_NATIVE_LIB:$FRQ_LIB_PATH${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" | 190 | export LD_LIBRARY_PATH="$JOLT_NATIVE_LIB:$FRQ_LIB_PATH${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" |
| @@ -204,7 +207,8 @@ repl *args: | |||
| 204 | fi | 207 | fi |
| 205 | 208 | ||
| 206 | deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}" | 209 | deps="{:deps {jolt-lang/glimmer {:local/root \"$GLIMMER_SRC\"}" |
| 207 | - deps="$deps nandi/glimmer-vidya {:local/root \"$GLIMMER_VIDYA_SRC\"}}}" | 210 | + deps="$deps nandi/glimmer-jvui {:local/root \"$GLIMMER_JVUI_SRC\"}" |
| 211 | + deps="$deps jvui/jvui {:local/root \"$JVUI_SRC\"}}}" | ||
| 208 | 212 | ||
| 209 | export LD_LIBRARY_PATH="$JOLT_NATIVE_LIB:$FRQ_LIB_PATH${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" | 213 | export LD_LIBRARY_PATH="$JOLT_NATIVE_LIB:$FRQ_LIB_PATH${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" |
| 210 | 214 | ||
modified
nix/android.nix +25 -27 | @@ -52,25 +52,21 @@ let | ||
| 52 | 52 | # used to be written here by hand. `just bump` moves it with |
| 53 | 53 | # `nix flake update jolt-native-android` and nothing in this file changes. |
| 54 | 54 | # |
| 55 | - # One archive, two libraries: libvidya (the retained-tree UI) and libjoltmoq | |
| 56 | - # (the AV media plane). They are built together and only make sense together | |
| 57 | - # — libjoltapp links both — so there is one pin for the pair rather than two | |
| 58 | - # that could drift apart. It carries include/ and libc++_shared.so besides, | |
| 59 | - # which is why the glue's headers and the C++ runtime come from here too. | |
| 55 | + # One archive. libvidya (the retained-tree UI) is what is taken from it, and | |
| 56 | + # include/ beside it for the glue's headers. | |
| 57 | + # | |
| 58 | + # It also carries libjoltmoq and the libc++_shared that object needs, and | |
| 59 | + # neither is packed any more. frq's media plane is `frq.av.plane` now — MoQ | |
| 60 | + # over QUIC through libmoq_ffi, Opus, H.264 and the devices — and none of | |
| 61 | + # that is built for Android yet, so a phone has no media plane at all and | |
| 62 | + # `frq.av/available?` says so. Shipping the Rust one it no longer loads was | |
| 63 | + # seventeen megabytes of APK for an object nothing opens. | |
| 60 | 64 | nativeLibs = jolt-native-android; |
| 61 | 65 | |
| 62 | - # The C++ runtime, out of the archive rather than the NDK composed here. | |
| 63 | - # | |
| 64 | - # openh264 is C++, and its build script asks to be linked against | |
| 65 | - # `libc++_shared.so` by name — so libjoltmoq carries that as a DT_NEEDED. An | |
| 66 | - # app's linker namespace will not hand out the platform's own copy (there is | |
| 67 | - # no stable one to hand out), so the APK carries it, exactly as it carries | |
| 68 | - # OpenSSL below and for the same reason. | |
| 69 | - # | |
| 70 | - # jolt-native ships it beside the libraries that need it, so this is the copy | |
| 71 | - # they were actually linked against — where the NDK path was whichever | |
| 72 | - # revision `composeAndroidPackages` happened to resolve here. | |
| 73 | - libcxx = "${nativeLibs}/lib/${abi}/libc++_shared.so"; | |
| 66 | + # No libc++_shared. It was here because openh264 is C++ and libjoltmoq | |
| 67 | + # carried it as a DT_NEEDED; libvidya links neither — its NEEDED list is | |
| 68 | + # libdl, libandroid, liblog, libm and libc — so with the media plane gone | |
| 69 | + # the C++ runtime has nothing to serve. | |
| 74 | 70 | |
| 75 | 71 | # --- Chez's arm64 cross target ------------------------------------------ |
| 76 | 72 | # The one piece with no nixpkgs equivalent: `pkgs.chez` builds a Scheme for |
| @@ -247,9 +243,13 @@ let | ||
| 247 | 243 | libjoltapp = pkgs.runCommand "libjoltapp.so" { } '' |
| 248 | 244 | mkdir -p lib |
| 249 | 245 | cp ${nativeLibs}/lib/${abi}/libvidya.so lib/libvidya.so |
| 250 | - cp ${nativeLibs}/lib/${abi}/libjoltmoq.so lib/libjoltmoq.so | |
| 251 | 246 | |
| 252 | - ${cc} -shared -fPIC -O2 -o "$out" \ | |
| 247 | + # -DJOLT_WITHOUT_MOQ: the glue registers libjoltmoq's symbols for the | |
| 248 | + # Scheme side, and --no-undefined below turns each of those into a link | |
| 249 | + # error once the object is not linked. The define takes them out, which | |
| 250 | + # is the honest way to say "this app has no Rust media plane" rather | |
| 251 | + # than linking one to satisfy a reference nothing calls. | |
| 252 | + ${cc} -shared -fPIC -O2 -DJOLT_WITHOUT_MOQ -o "$out" \ | |
| 253 | 253 | ${jolt-native}/android/jolt_main.c \ |
| 254 | 254 | ${joltBootObj} \ |
| 255 | 255 | -I${joltBoot} \ |
| @@ -257,7 +257,7 @@ let | ||
| 257 | 257 | -Llib \ |
| 258 | 258 | ${chezAndroid}/tarm64le/boot/tarm64le/libkernel.a \ |
| 259 | 259 | ${chezAndroid}/lz4/lib/liblz4.a \ |
| 260 | - -lvidya -ljoltmoq -landroid -llog -lz -ldl -lm -Wl,--no-undefined | |
| 260 | + -lvidya -landroid -llog -lz -ldl -lm -Wl,--no-undefined | |
| 261 | 261 | ''; |
| 262 | 262 | |
| 263 | 263 | # --- the Java half -------------------------------------------------------- |
| @@ -327,8 +327,6 @@ let | ||
| 327 | 327 | } '' |
| 328 | 328 | mkdir -p stage/lib/${abi} |
| 329 | 329 | cp ${nativeLibs}/lib/${abi}/libvidya.so stage/lib/${abi}/libvidya.so |
| 330 | - cp ${nativeLibs}/lib/${abi}/libjoltmoq.so stage/lib/${abi}/libjoltmoq.so | |
| 331 | - cp ${libcxx} stage/lib/${abi}/libc++_shared.so | |
| 332 | 330 | cp ${libjoltapp} stage/lib/${abi}/libjoltapp.so |
| 333 | 331 | cp ${opensslAndroid.out}/lib/libssl.so stage/lib/${abi}/libssl.so |
| 334 | 332 | cp ${opensslAndroid.out}/lib/libcrypto.so stage/lib/${abi}/libcrypto.so |
| @@ -337,9 +335,10 @@ let | ||
| 337 | 335 | |
| 338 | 336 | # Everything the loader needs is in .dynsym, and that is what --strip-all |
| 339 | 337 | # keeps: what goes is .symtab and the debug sections, which are read by a |
| 340 | - # debugger and by nothing on the phone. Worth about a third of the package | |
| 341 | - # — libjoltmoq and libc++_shared are most of it, and the release libraries | |
| 342 | - # arrive unstripped because jolt-native's own build does not strip them. | |
| 338 | + # debugger and by nothing on the phone. Worth less than it used to be — | |
| 339 | + # libjoltmoq and libc++_shared were most of it and are no longer packed — | |
| 340 | + # but the release libraries still arrive unstripped, because jolt-native's | |
| 341 | + # own build does not strip them. | |
| 343 | 342 | # |
| 344 | 343 | # Here rather than in the derivations that produce them: the inputs stay |
| 345 | 344 | # whole (a stripped libjoltapp is a worse thing to hand a debugger, and |
| @@ -355,8 +354,7 @@ let | ||
| 355 | 354 | --version-code 1 --version-name ${version} |
| 356 | 355 | |
| 357 | 356 | ( cd stage && \ |
| 358 | - zip -q -0 "$out" lib/${abi}/libvidya.so lib/${abi}/libjoltmoq.so \ | |
| 359 | - lib/${abi}/libc++_shared.so lib/${abi}/libjoltapp.so \ | |
| 357 | + zip -q -0 "$out" lib/${abi}/libvidya.so lib/${abi}/libjoltapp.so \ | |
| 360 | 358 | lib/${abi}/libssl.so lib/${abi}/libcrypto.so && \ |
| 361 | 359 | zip -q "$out" classes.dex ) |
| 362 | 360 | ''; |
| @@ -52,25 +52,21 @@ let | |||
| 52 | # used to be written here by hand. `just bump` moves it with | 52 | # used to be written here by hand. `just bump` moves it with |
| 53 | # `nix flake update jolt-native-android` and nothing in this file changes. | 53 | # `nix flake update jolt-native-android` and nothing in this file changes. |
| 54 | # | 54 | # |
| 55 | - # One archive, two libraries: libvidya (the retained-tree UI) and libjoltmoq | 55 | + # One archive. libvidya (the retained-tree UI) is what is taken from it, and |
| 56 | - # (the AV media plane). They are built together and only make sense together | 56 | + # include/ beside it for the glue's headers. |
| 57 | - # — libjoltapp links both — so there is one pin for the pair rather than two | 57 | + # |
| 58 | - # that could drift apart. It carries include/ and libc++_shared.so besides, | 58 | + # It also carries libjoltmoq and the libc++_shared that object needs, and |
| 59 | - # which is why the glue's headers and the C++ runtime come from here too. | 59 | + # neither is packed any more. frq's media plane is `frq.av.plane` now — MoQ |
| 60 | + # over QUIC through libmoq_ffi, Opus, H.264 and the devices — and none of | ||
| 61 | + # that is built for Android yet, so a phone has no media plane at all and | ||
| 62 | + # `frq.av/available?` says so. Shipping the Rust one it no longer loads was | ||
| 63 | + # seventeen megabytes of APK for an object nothing opens. | ||
| 60 | nativeLibs = jolt-native-android; | 64 | nativeLibs = jolt-native-android; |
| 61 | 65 | ||
| 62 | - # The C++ runtime, out of the archive rather than the NDK composed here. | 66 | + # No libc++_shared. It was here because openh264 is C++ and libjoltmoq |
| 63 | - # | 67 | + # carried it as a DT_NEEDED; libvidya links neither — its NEEDED list is |
| 64 | - # openh264 is C++, and its build script asks to be linked against | 68 | + # libdl, libandroid, liblog, libm and libc — so with the media plane gone |
| 65 | - # `libc++_shared.so` by name — so libjoltmoq carries that as a DT_NEEDED. An | 69 | + # the C++ runtime has nothing to serve. |
| 66 | - # app's linker namespace will not hand out the platform's own copy (there is | ||
| 67 | - # no stable one to hand out), so the APK carries it, exactly as it carries | ||
| 68 | - # OpenSSL below and for the same reason. | ||
| 69 | - # | ||
| 70 | - # jolt-native ships it beside the libraries that need it, so this is the copy | ||
| 71 | - # they were actually linked against — where the NDK path was whichever | ||
| 72 | - # revision `composeAndroidPackages` happened to resolve here. | ||
| 73 | - libcxx = "${nativeLibs}/lib/${abi}/libc++_shared.so"; | ||
| 74 | 70 | ||
| 75 | # --- Chez's arm64 cross target ------------------------------------------ | 71 | # --- Chez's arm64 cross target ------------------------------------------ |
| 76 | # The one piece with no nixpkgs equivalent: `pkgs.chez` builds a Scheme for | 72 | # The one piece with no nixpkgs equivalent: `pkgs.chez` builds a Scheme for |
| @@ -247,9 +243,13 @@ let | |||
| 247 | libjoltapp = pkgs.runCommand "libjoltapp.so" { } '' | 243 | libjoltapp = pkgs.runCommand "libjoltapp.so" { } '' |
| 248 | mkdir -p lib | 244 | mkdir -p lib |
| 249 | cp ${nativeLibs}/lib/${abi}/libvidya.so lib/libvidya.so | 245 | cp ${nativeLibs}/lib/${abi}/libvidya.so lib/libvidya.so |
| 250 | - cp ${nativeLibs}/lib/${abi}/libjoltmoq.so lib/libjoltmoq.so | ||
| 251 | 246 | ||
| 252 | - ${cc} -shared -fPIC -O2 -o "$out" \ | 247 | + # -DJOLT_WITHOUT_MOQ: the glue registers libjoltmoq's symbols for the |
| 248 | + # Scheme side, and --no-undefined below turns each of those into a link | ||
| 249 | + # error once the object is not linked. The define takes them out, which | ||
| 250 | + # is the honest way to say "this app has no Rust media plane" rather | ||
| 251 | + # than linking one to satisfy a reference nothing calls. | ||
| 252 | + ${cc} -shared -fPIC -O2 -DJOLT_WITHOUT_MOQ -o "$out" \ | ||
| 253 | ${jolt-native}/android/jolt_main.c \ | 253 | ${jolt-native}/android/jolt_main.c \ |
| 254 | ${joltBootObj} \ | 254 | ${joltBootObj} \ |
| 255 | -I${joltBoot} \ | 255 | -I${joltBoot} \ |
| @@ -257,7 +257,7 @@ let | |||
| 257 | -Llib \ | 257 | -Llib \ |
| 258 | ${chezAndroid}/tarm64le/boot/tarm64le/libkernel.a \ | 258 | ${chezAndroid}/tarm64le/boot/tarm64le/libkernel.a \ |
| 259 | ${chezAndroid}/lz4/lib/liblz4.a \ | 259 | ${chezAndroid}/lz4/lib/liblz4.a \ |
| 260 | - -lvidya -ljoltmoq -landroid -llog -lz -ldl -lm -Wl,--no-undefined | 260 | + -lvidya -landroid -llog -lz -ldl -lm -Wl,--no-undefined |
| 261 | ''; | 261 | ''; |
| 262 | 262 | ||
| 263 | # --- the Java half -------------------------------------------------------- | 263 | # --- the Java half -------------------------------------------------------- |
| @@ -327,8 +327,6 @@ let | |||
| 327 | } '' | 327 | } '' |
| 328 | mkdir -p stage/lib/${abi} | 328 | mkdir -p stage/lib/${abi} |
| 329 | cp ${nativeLibs}/lib/${abi}/libvidya.so stage/lib/${abi}/libvidya.so | 329 | cp ${nativeLibs}/lib/${abi}/libvidya.so stage/lib/${abi}/libvidya.so |
| 330 | - cp ${nativeLibs}/lib/${abi}/libjoltmoq.so stage/lib/${abi}/libjoltmoq.so | ||
| 331 | - cp ${libcxx} stage/lib/${abi}/libc++_shared.so | ||
| 332 | cp ${libjoltapp} stage/lib/${abi}/libjoltapp.so | 330 | cp ${libjoltapp} stage/lib/${abi}/libjoltapp.so |
| 333 | cp ${opensslAndroid.out}/lib/libssl.so stage/lib/${abi}/libssl.so | 331 | cp ${opensslAndroid.out}/lib/libssl.so stage/lib/${abi}/libssl.so |
| 334 | cp ${opensslAndroid.out}/lib/libcrypto.so stage/lib/${abi}/libcrypto.so | 332 | cp ${opensslAndroid.out}/lib/libcrypto.so stage/lib/${abi}/libcrypto.so |
| @@ -337,9 +335,10 @@ let | |||
| 337 | 335 | ||
| 338 | # Everything the loader needs is in .dynsym, and that is what --strip-all | 336 | # Everything the loader needs is in .dynsym, and that is what --strip-all |
| 339 | # keeps: what goes is .symtab and the debug sections, which are read by a | 337 | # keeps: what goes is .symtab and the debug sections, which are read by a |
| 340 | - # debugger and by nothing on the phone. Worth about a third of the package | 338 | + # debugger and by nothing on the phone. Worth less than it used to be — |
| 341 | - # — libjoltmoq and libc++_shared are most of it, and the release libraries | 339 | + # libjoltmoq and libc++_shared were most of it and are no longer packed — |
| 342 | - # arrive unstripped because jolt-native's own build does not strip them. | 340 | + # but the release libraries still arrive unstripped, because jolt-native's |
| 341 | + # own build does not strip them. | ||
| 343 | # | 342 | # |
| 344 | # Here rather than in the derivations that produce them: the inputs stay | 343 | # Here rather than in the derivations that produce them: the inputs stay |
| 345 | # whole (a stripped libjoltapp is a worse thing to hand a debugger, and | 344 | # whole (a stripped libjoltapp is a worse thing to hand a debugger, and |
| @@ -355,8 +354,7 @@ let | |||
| 355 | --version-code 1 --version-name ${version} | 354 | --version-code 1 --version-name ${version} |
| 356 | 355 | ||
| 357 | ( cd stage && \ | 356 | ( cd stage && \ |
| 358 | - zip -q -0 "$out" lib/${abi}/libvidya.so lib/${abi}/libjoltmoq.so \ | 357 | + zip -q -0 "$out" lib/${abi}/libvidya.so lib/${abi}/libjoltapp.so \ |
| 359 | - lib/${abi}/libc++_shared.so lib/${abi}/libjoltapp.so \ | ||
| 360 | lib/${abi}/libssl.so lib/${abi}/libcrypto.so && \ | 358 | lib/${abi}/libssl.so lib/${abi}/libcrypto.so && \ |
| 361 | zip -q "$out" classes.dex ) | 359 | zip -q "$out" classes.dex ) |
| 362 | ''; | 360 | ''; |
modified
src/frq/app.clj +9 -9 | @@ -7,7 +7,7 @@ | ||
| 7 | 7 | (:require [clojure.string :as str] |
| 8 | 8 | [glimmer.ratom :as r :refer [atom]] |
| 9 | 9 | [glimmer.core :as ui] |
| 10 | - [glimmer-vidya.core :as vidya] | |
| 10 | + [glimmer-jvui.core :as gui] | |
| 11 | 11 | [frq.av :as av] |
| 12 | 12 | [frq.avatars :as avatars] |
| 13 | 13 | [frq.clock :as clock] |
| @@ -473,11 +473,11 @@ | ||
| 473 | 473 | (reset! s/highlight id) |
| 474 | 474 | ;; Off again once the frame that scrolled has |
| 475 | 475 | ;; been painted, so the reader keeps the view. |
| 476 | - (vidya/after! 120 (fn [] (reset! s/jump-to nil))) | |
| 476 | + (gui/after! 120 (fn [] (reset! s/jump-to nil))) | |
| 477 | 477 | ;; The highlight stays long enough to be read, |
| 478 | 478 | ;; and only clears itself: a later jump elsewhere |
| 479 | 479 | ;; owns the highlight from then on. |
| 480 | - (vidya/after! 2000 | |
| 480 | + (gui/after! 2000 | |
| 481 | 481 | (fn [] |
| 482 | 482 | (when (= id @s/highlight) |
| 483 | 483 | (reset! s/highlight nil)))))}] |
| @@ -1551,7 +1551,7 @@ | ||
| 1551 | 1551 | [:card {} |
| 1552 | 1552 | [:title-2 {:label "frq"}] |
| 1553 | 1553 | [:dim-label {:label "freeq client in jolt — glimmer components on the Vidya/egui backend."}] |
| 1554 | - [:button {:label "Quit" :on-click vidya/quit!}]] | |
| 1554 | + [:button {:label "Quit" :on-click gui/quit!}]] | |
| 1555 | 1555 | [:separator {}] |
| 1556 | 1556 | [tab-bar]]) |
| 1557 | 1557 | |
| @@ -1657,15 +1657,15 @@ | ||
| 1657 | 1657 | nil) |
| 1658 | 1658 | |
| 1659 | 1659 | (defn -main [& _] |
| 1660 | - (start! {:after! vidya/after! | |
| 1661 | - :every! vidya/every! | |
| 1662 | - :title! vidya/set-title! | |
| 1660 | + (start! {:after! gui/after! | |
| 1661 | + :every! gui/every! | |
| 1662 | + :title! gui/set-title! | |
| 1663 | 1663 | ;; The height comes off the same tick, from `screen-size` rather |
| 1664 | 1664 | ;; than a second call: it is the window's content size, and the |
| 1665 | 1665 | ;; pictures in the conversation are sized against it. |
| 1666 | 1666 | :measure! (fn [] |
| 1667 | - (let [w (vidya/window-width) | |
| 1668 | - h (long (second (vidya/screen-size)))] | |
| 1667 | + (let [w (gui/window-width) | |
| 1668 | + h (long (second (gui/screen-size)))] | |
| 1669 | 1669 | (when (not= w @s/window-width) |
| 1670 | 1670 | (reset! s/window-width w)) |
| 1671 | 1671 | (when (not= h @s/window-height) |
| @@ -7,7 +7,7 @@ | |||
| 7 | (:require [clojure.string :as str] | 7 | (:require [clojure.string :as str] |
| 8 | [glimmer.ratom :as r :refer [atom]] | 8 | [glimmer.ratom :as r :refer [atom]] |
| 9 | [glimmer.core :as ui] | 9 | [glimmer.core :as ui] |
| 10 | - [glimmer-vidya.core :as vidya] | 10 | + [glimmer-jvui.core :as gui] |
| 11 | [frq.av :as av] | 11 | [frq.av :as av] |
| 12 | [frq.avatars :as avatars] | 12 | [frq.avatars :as avatars] |
| 13 | [frq.clock :as clock] | 13 | [frq.clock :as clock] |
| @@ -473,11 +473,11 @@ | |||
| 473 | (reset! s/highlight id) | 473 | (reset! s/highlight id) |
| 474 | ;; Off again once the frame that scrolled has | 474 | ;; Off again once the frame that scrolled has |
| 475 | ;; been painted, so the reader keeps the view. | 475 | ;; been painted, so the reader keeps the view. |
| 476 | - (vidya/after! 120 (fn [] (reset! s/jump-to nil))) | 476 | + (gui/after! 120 (fn [] (reset! s/jump-to nil))) |
| 477 | ;; The highlight stays long enough to be read, | 477 | ;; The highlight stays long enough to be read, |
| 478 | ;; and only clears itself: a later jump elsewhere | 478 | ;; and only clears itself: a later jump elsewhere |
| 479 | ;; owns the highlight from then on. | 479 | ;; owns the highlight from then on. |
| 480 | - (vidya/after! 2000 | 480 | + (gui/after! 2000 |
| 481 | (fn [] | 481 | (fn [] |
| 482 | (when (= id @s/highlight) | 482 | (when (= id @s/highlight) |
| 483 | (reset! s/highlight nil)))))}] | 483 | (reset! s/highlight nil)))))}] |
| @@ -1551,7 +1551,7 @@ | |||
| 1551 | [:card {} | 1551 | [:card {} |
| 1552 | [:title-2 {:label "frq"}] | 1552 | [:title-2 {:label "frq"}] |
| 1553 | [:dim-label {:label "freeq client in jolt — glimmer components on the Vidya/egui backend."}] | 1553 | [:dim-label {:label "freeq client in jolt — glimmer components on the Vidya/egui backend."}] |
| 1554 | - [:button {:label "Quit" :on-click vidya/quit!}]] | 1554 | + [:button {:label "Quit" :on-click gui/quit!}]] |
| 1555 | [:separator {}] | 1555 | [:separator {}] |
| 1556 | [tab-bar]]) | 1556 | [tab-bar]]) |
| 1557 | 1557 | ||
| @@ -1657,15 +1657,15 @@ | |||
| 1657 | nil) | 1657 | nil) |
| 1658 | 1658 | ||
| 1659 | (defn -main [& _] | 1659 | (defn -main [& _] |
| 1660 | - (start! {:after! vidya/after! | 1660 | + (start! {:after! gui/after! |
| 1661 | - :every! vidya/every! | 1661 | + :every! gui/every! |
| 1662 | - :title! vidya/set-title! | 1662 | + :title! gui/set-title! |
| 1663 | ;; The height comes off the same tick, from `screen-size` rather | 1663 | ;; The height comes off the same tick, from `screen-size` rather |
| 1664 | ;; than a second call: it is the window's content size, and the | 1664 | ;; than a second call: it is the window's content size, and the |
| 1665 | ;; pictures in the conversation are sized against it. | 1665 | ;; pictures in the conversation are sized against it. |
| 1666 | :measure! (fn [] | 1666 | :measure! (fn [] |
| 1667 | - (let [w (vidya/window-width) | 1667 | + (let [w (gui/window-width) |
| 1668 | - h (long (second (vidya/screen-size)))] | 1668 | + h (long (second (gui/screen-size)))] |
| 1669 | (when (not= w @s/window-width) | 1669 | (when (not= w @s/window-width) |
| 1670 | (reset! s/window-width w)) | 1670 | (reset! s/window-width w)) |
| 1671 | (when (not= h @s/window-height) | 1671 | (when (not= h @s/window-height) |
modified
src/frq/av.clj +8 -8 | @@ -27,7 +27,7 @@ | ||
| 27 | 27 | borrowed pointers because a frame at thirty a second cannot afford a copy." |
| 28 | 28 | (:require [clojure.string :as str] |
| 29 | 29 | [glimmer.ratom :as r :refer [atom]] |
| 30 | - [glimmer-vidya.core :as vidya] | |
| 30 | + [glimmer-jvui.core :as gui] | |
| 31 | 31 | [frq.irc :as irc] |
| 32 | 32 | [frq.av.dial :as dial] |
| 33 | 33 | [frq.av.plane :as plane] |
| @@ -258,7 +258,7 @@ | ||
| 258 | 258 | (defn- drop-feeds! |
| 259 | 259 | "Stop painting every feed we have been pushing." |
| 260 | 260 | [] |
| 261 | - (doseq [k @painted-feeds] (vidya/frame-drop! k)) | |
| 261 | + (doseq [k @painted-feeds] (gui/frame-drop! k)) | |
| 262 | 262 | (reset! painted-feeds #{}) |
| 263 | 263 | (reset! feeds [])) |
| 264 | 264 | |
| @@ -412,7 +412,7 @@ | ||
| 412 | 412 | ;; The tile goes when the camera does: the plane stops publishing, so no |
| 413 | 413 | ;; frame arrives to replace the last one. |
| 414 | 414 | (when-not on? |
| 415 | - (vidya/frame-drop! local-feed) | |
| 415 | + (gui/frame-drop! local-feed) | |
| 416 | 416 | (swap! painted-feeds disj local-feed))) |
| 417 | 417 | |
| 418 | 418 | ;; Switching a device mid-call reopens it, which the plane can only do by |
| @@ -478,7 +478,7 @@ | ||
| 478 | 478 | [] |
| 479 | 479 | (doseq [{:keys [key w h rgba]} (plane/poll-frames!)] |
| 480 | 480 | (when (and (seq key) (pos? w) (pos? h) rgba) |
| 481 | - (vidya/frame-rgba! key w h rgba) | |
| 481 | + (gui/frame-rgba! key w h rgba) | |
| 482 | 482 | (swap! painted-feeds conj key)))) |
| 483 | 483 | |
| 484 | 484 | (defn- order-feeds |
| @@ -502,7 +502,7 @@ | ||
| 502 | 502 | [] |
| 503 | 503 | (let [live (plane/feed-keys)] |
| 504 | 504 | (doseq [k (remove live @painted-feeds)] |
| 505 | - (vidya/frame-drop! k) | |
| 505 | + (gui/frame-drop! k) | |
| 506 | 506 | (swap! painted-feeds disj k)) |
| 507 | 507 | (let [ordered (order-feeds live)] |
| 508 | 508 | (when-not (= ordered @feeds) |
| @@ -519,7 +519,7 @@ | ||
| 519 | 519 | one would re-render the wall for a third of a point of difference nobody can |
| 520 | 520 | see." |
| 521 | 521 | [] |
| 522 | - (let [[w h] (vidya/screen-size) | |
| 522 | + (let [[w h] (gui/screen-size) | |
| 523 | 523 | w (long w) |
| 524 | 524 | h (long h)] |
| 525 | 525 | (when-not (= w @window-width) (reset! window-width w)) |
| @@ -528,7 +528,7 @@ | ||
| 528 | 528 | (defn pump! |
| 529 | 529 | "One frame's worth of the media plane. Cheap when no call is up. |
| 530 | 530 | |
| 531 | - Runs on the loop thread — `vidya/frame-rgba!` may not be called from anywhere | |
| 531 | + Runs on the loop thread — `gui/frame-rgba!` may not be called from anywhere | |
| 532 | 532 | else, and neither may anything that touches a node." |
| 533 | 533 | [] |
| 534 | 534 | (pump-window!) |
| @@ -559,7 +559,7 @@ | ||
| 559 | 559 | arrives: polling slower than the window paints would show every other frame." |
| 560 | 560 | [] |
| 561 | 561 | (when (available?) |
| 562 | - (vidya/every! 16 pump!))) | |
| 562 | + (gui/every! 16 pump!))) | |
| 563 | 563 | |
| 564 | 564 | (defn tiles |
| 565 | 565 | "Everyone with a picture in the current call, the self-view last. |
| @@ -27,7 +27,7 @@ | |||
| 27 | borrowed pointers because a frame at thirty a second cannot afford a copy." | 27 | borrowed pointers because a frame at thirty a second cannot afford a copy." |
| 28 | (:require [clojure.string :as str] | 28 | (:require [clojure.string :as str] |
| 29 | [glimmer.ratom :as r :refer [atom]] | 29 | [glimmer.ratom :as r :refer [atom]] |
| 30 | - [glimmer-vidya.core :as vidya] | 30 | + [glimmer-jvui.core :as gui] |
| 31 | [frq.irc :as irc] | 31 | [frq.irc :as irc] |
| 32 | [frq.av.dial :as dial] | 32 | [frq.av.dial :as dial] |
| 33 | [frq.av.plane :as plane] | 33 | [frq.av.plane :as plane] |
| @@ -258,7 +258,7 @@ | |||
| 258 | (defn- drop-feeds! | 258 | (defn- drop-feeds! |
| 259 | "Stop painting every feed we have been pushing." | 259 | "Stop painting every feed we have been pushing." |
| 260 | [] | 260 | [] |
| 261 | - (doseq [k @painted-feeds] (vidya/frame-drop! k)) | 261 | + (doseq [k @painted-feeds] (gui/frame-drop! k)) |
| 262 | (reset! painted-feeds #{}) | 262 | (reset! painted-feeds #{}) |
| 263 | (reset! feeds [])) | 263 | (reset! feeds [])) |
| 264 | 264 | ||
| @@ -412,7 +412,7 @@ | |||
| 412 | ;; The tile goes when the camera does: the plane stops publishing, so no | 412 | ;; The tile goes when the camera does: the plane stops publishing, so no |
| 413 | ;; frame arrives to replace the last one. | 413 | ;; frame arrives to replace the last one. |
| 414 | (when-not on? | 414 | (when-not on? |
| 415 | - (vidya/frame-drop! local-feed) | 415 | + (gui/frame-drop! local-feed) |
| 416 | (swap! painted-feeds disj local-feed))) | 416 | (swap! painted-feeds disj local-feed))) |
| 417 | 417 | ||
| 418 | ;; Switching a device mid-call reopens it, which the plane can only do by | 418 | ;; Switching a device mid-call reopens it, which the plane can only do by |
| @@ -478,7 +478,7 @@ | |||
| 478 | [] | 478 | [] |
| 479 | (doseq [{:keys [key w h rgba]} (plane/poll-frames!)] | 479 | (doseq [{:keys [key w h rgba]} (plane/poll-frames!)] |
| 480 | (when (and (seq key) (pos? w) (pos? h) rgba) | 480 | (when (and (seq key) (pos? w) (pos? h) rgba) |
| 481 | - (vidya/frame-rgba! key w h rgba) | 481 | + (gui/frame-rgba! key w h rgba) |
| 482 | (swap! painted-feeds conj key)))) | 482 | (swap! painted-feeds conj key)))) |
| 483 | 483 | ||
| 484 | (defn- order-feeds | 484 | (defn- order-feeds |
| @@ -502,7 +502,7 @@ | |||
| 502 | [] | 502 | [] |
| 503 | (let [live (plane/feed-keys)] | 503 | (let [live (plane/feed-keys)] |
| 504 | (doseq [k (remove live @painted-feeds)] | 504 | (doseq [k (remove live @painted-feeds)] |
| 505 | - (vidya/frame-drop! k) | 505 | + (gui/frame-drop! k) |
| 506 | (swap! painted-feeds disj k)) | 506 | (swap! painted-feeds disj k)) |
| 507 | (let [ordered (order-feeds live)] | 507 | (let [ordered (order-feeds live)] |
| 508 | (when-not (= ordered @feeds) | 508 | (when-not (= ordered @feeds) |
| @@ -519,7 +519,7 @@ | |||
| 519 | one would re-render the wall for a third of a point of difference nobody can | 519 | one would re-render the wall for a third of a point of difference nobody can |
| 520 | see." | 520 | see." |
| 521 | [] | 521 | [] |
| 522 | - (let [[w h] (vidya/screen-size) | 522 | + (let [[w h] (gui/screen-size) |
| 523 | w (long w) | 523 | w (long w) |
| 524 | h (long h)] | 524 | h (long h)] |
| 525 | (when-not (= w @window-width) (reset! window-width w)) | 525 | (when-not (= w @window-width) (reset! window-width w)) |
| @@ -528,7 +528,7 @@ | |||
| 528 | (defn pump! | 528 | (defn pump! |
| 529 | "One frame's worth of the media plane. Cheap when no call is up. | 529 | "One frame's worth of the media plane. Cheap when no call is up. |
| 530 | 530 | ||
| 531 | - Runs on the loop thread — `vidya/frame-rgba!` may not be called from anywhere | 531 | + Runs on the loop thread — `gui/frame-rgba!` may not be called from anywhere |
| 532 | else, and neither may anything that touches a node." | 532 | else, and neither may anything that touches a node." |
| 533 | [] | 533 | [] |
| 534 | (pump-window!) | 534 | (pump-window!) |
| @@ -559,7 +559,7 @@ | |||
| 559 | arrives: polling slower than the window paints would show every other frame." | 559 | arrives: polling slower than the window paints would show every other frame." |
| 560 | [] | 560 | [] |
| 561 | (when (available?) | 561 | (when (available?) |
| 562 | - (vidya/every! 16 pump!))) | 562 | + (gui/every! 16 pump!))) |
| 563 | 563 | ||
| 564 | (defn tiles | 564 | (defn tiles |
| 565 | "Everyone with a picture in the current call, the self-view last. | 565 | "Everyone with a picture in the current call, the self-view last. |
modified
src/frq/platform.clj +2 -2 | @@ -1,6 +1,6 @@ | ||
| 1 | 1 | (ns frq.platform |
| 2 | 2 | "The few things that are the platform's job rather than the app's." |
| 3 | - (:require [glimmer-vidya.core :as vidya] | |
| 3 | + (:require [glimmer-jvui.core :as gui] | |
| 4 | 4 | [jolt.host :as host])) |
| 5 | 5 | |
| 6 | 6 | (defn android? |
| @@ -26,7 +26,7 @@ | ||
| 26 | 26 | \"if the browser did not open\" line to carry the URL across." |
| 27 | 27 | [url] |
| 28 | 28 | (try |
| 29 | - (vidya/open-url! (or url "")) | |
| 29 | + (gui/open-url! (or url "")) | |
| 30 | 30 | (catch Exception _ false))) |
| 31 | 31 | |
| 32 | 32 | (defn return-url |
| @@ -1,6 +1,6 @@ | |||
| 1 | (ns frq.platform | 1 | (ns frq.platform |
| 2 | "The few things that are the platform's job rather than the app's." | 2 | "The few things that are the platform's job rather than the app's." |
| 3 | - (:require [glimmer-vidya.core :as vidya] | 3 | + (:require [glimmer-jvui.core :as gui] |
| 4 | [jolt.host :as host])) | 4 | [jolt.host :as host])) |
| 5 | 5 | ||
| 6 | (defn android? | 6 | (defn android? |
| @@ -26,7 +26,7 @@ | |||
| 26 | \"if the browser did not open\" line to carry the URL across." | 26 | \"if the browser did not open\" line to carry the URL across." |
| 27 | [url] | 27 | [url] |
| 28 | (try | 28 | (try |
| 29 | - (vidya/open-url! (or url "")) | 29 | + (gui/open-url! (or url "")) |
| 30 | (catch Exception _ false))) | 30 | (catch Exception _ false))) |
| 31 | 31 | ||
| 32 | (defn return-url | 32 | (defn return-url |
modified
src/frq/state.clj +6 -6 | @@ -18,7 +18,7 @@ | ||
| 18 | 18 | [frq.oauth :as oauth] |
| 19 | 19 | [frq.store :as store] |
| 20 | 20 | [frq.upload :as upload] |
| 21 | - [glimmer-vidya.core :as vidya])) | |
| 21 | + [glimmer-jvui.core :as gui])) | |
| 22 | 22 | |
| 23 | 23 | (def default-host "irc.freeq.at") |
| 24 | 24 | (def default-port "6697") |
| @@ -1367,7 +1367,7 @@ | ||
| 1367 | 1367 | [] |
| 1368 | 1368 | (let [path (paste-path)] |
| 1369 | 1369 | (host/mkdirs! (str (media/cache-dir) "/outgoing")) |
| 1370 | - (if-not (vidya/clipboard-image-png! path) | |
| 1370 | + (if-not (gui/clipboard-image-png! path) | |
| 1371 | 1371 | ;; Android has no clipboard of pictures to read at all, which is the |
| 1372 | 1372 | ;; other half of why the picker below exists. |
| 1373 | 1373 | (reset! error "No picture on the clipboard.") |
| @@ -1450,7 +1450,7 @@ | ||
| 1450 | 1450 | [] |
| 1451 | 1451 | (let [path (paste-path)] |
| 1452 | 1452 | (host/mkdirs! (str (media/cache-dir) "/outgoing")) |
| 1453 | - (when (vidya/picked-image! path) | |
| 1453 | + (when (gui/picked-image! path) | |
| 1454 | 1454 | (reset! choosing nil) |
| 1455 | 1455 | (attach! path "picture.png") |
| 1456 | 1456 | true))) |
| @@ -1460,7 +1460,7 @@ | ||
| 1460 | 1460 | (when-not (take-chosen!) |
| 1461 | 1461 | (if (pos? left) |
| 1462 | 1462 | (do (reset! choosing (dec left)) |
| 1463 | - (vidya/after! choose-poll-ms poll-chosen!)) | |
| 1463 | + (gui/after! choose-poll-ms poll-chosen!)) | |
| 1464 | 1464 | (reset! choosing nil))))) |
| 1465 | 1465 | |
| 1466 | 1466 | (defn choose-image! |
| @@ -1473,10 +1473,10 @@ | ||
| 1473 | 1473 | permission, browsing finds almost nothing to show. False where there is no |
| 1474 | 1474 | chooser, which is every desktop, and there browsing is the answer." |
| 1475 | 1475 | [] |
| 1476 | - (when (vidya/pick-image!) | |
| 1476 | + (when (gui/pick-image!) | |
| 1477 | 1477 | (reset! error nil) |
| 1478 | 1478 | (reset! choosing choose-poll-limit) |
| 1479 | - (vidya/after! choose-poll-ms poll-chosen!) | |
| 1479 | + (gui/after! choose-poll-ms poll-chosen!) | |
| 1480 | 1480 | true)) |
| 1481 | 1481 | |
| 1482 | 1482 | (defn open-image-picker! |
| @@ -18,7 +18,7 @@ | |||
| 18 | [frq.oauth :as oauth] | 18 | [frq.oauth :as oauth] |
| 19 | [frq.store :as store] | 19 | [frq.store :as store] |
| 20 | [frq.upload :as upload] | 20 | [frq.upload :as upload] |
| 21 | - [glimmer-vidya.core :as vidya])) | 21 | + [glimmer-jvui.core :as gui])) |
| 22 | 22 | ||
| 23 | (def default-host "irc.freeq.at") | 23 | (def default-host "irc.freeq.at") |
| 24 | (def default-port "6697") | 24 | (def default-port "6697") |
| @@ -1367,7 +1367,7 @@ | |||
| 1367 | [] | 1367 | [] |
| 1368 | (let [path (paste-path)] | 1368 | (let [path (paste-path)] |
| 1369 | (host/mkdirs! (str (media/cache-dir) "/outgoing")) | 1369 | (host/mkdirs! (str (media/cache-dir) "/outgoing")) |
| 1370 | - (if-not (vidya/clipboard-image-png! path) | 1370 | + (if-not (gui/clipboard-image-png! path) |
| 1371 | ;; Android has no clipboard of pictures to read at all, which is the | 1371 | ;; Android has no clipboard of pictures to read at all, which is the |
| 1372 | ;; other half of why the picker below exists. | 1372 | ;; other half of why the picker below exists. |
| 1373 | (reset! error "No picture on the clipboard.") | 1373 | (reset! error "No picture on the clipboard.") |
| @@ -1450,7 +1450,7 @@ | |||
| 1450 | [] | 1450 | [] |
| 1451 | (let [path (paste-path)] | 1451 | (let [path (paste-path)] |
| 1452 | (host/mkdirs! (str (media/cache-dir) "/outgoing")) | 1452 | (host/mkdirs! (str (media/cache-dir) "/outgoing")) |
| 1453 | - (when (vidya/picked-image! path) | 1453 | + (when (gui/picked-image! path) |
| 1454 | (reset! choosing nil) | 1454 | (reset! choosing nil) |
| 1455 | (attach! path "picture.png") | 1455 | (attach! path "picture.png") |
| 1456 | true))) | 1456 | true))) |
| @@ -1460,7 +1460,7 @@ | |||
| 1460 | (when-not (take-chosen!) | 1460 | (when-not (take-chosen!) |
| 1461 | (if (pos? left) | 1461 | (if (pos? left) |
| 1462 | (do (reset! choosing (dec left)) | 1462 | (do (reset! choosing (dec left)) |
| 1463 | - (vidya/after! choose-poll-ms poll-chosen!)) | 1463 | + (gui/after! choose-poll-ms poll-chosen!)) |
| 1464 | (reset! choosing nil))))) | 1464 | (reset! choosing nil))))) |
| 1465 | 1465 | ||
| 1466 | (defn choose-image! | 1466 | (defn choose-image! |
| @@ -1473,10 +1473,10 @@ | |||
| 1473 | permission, browsing finds almost nothing to show. False where there is no | 1473 | permission, browsing finds almost nothing to show. False where there is no |
| 1474 | chooser, which is every desktop, and there browsing is the answer." | 1474 | chooser, which is every desktop, and there browsing is the answer." |
| 1475 | [] | 1475 | [] |
| 1476 | - (when (vidya/pick-image!) | 1476 | + (when (gui/pick-image!) |
| 1477 | (reset! error nil) | 1477 | (reset! error nil) |
| 1478 | (reset! choosing choose-poll-limit) | 1478 | (reset! choosing choose-poll-limit) |
| 1479 | - (vidya/after! choose-poll-ms poll-chosen!) | 1479 | + (gui/after! choose-poll-ms poll-chosen!) |
| 1480 | true)) | 1480 | true)) |
| 1481 | 1481 | ||
| 1482 | (defn open-image-picker! | 1482 | (defn open-image-picker! |