| A freeq client in jolt, as glimmer components on Vidya 4719d6f nandi 20d ago | 1 | # frq |
| 2 | |
| 3 | A **[freeq](https://github.com/codegod100/freeq)** client written in |
| 4 | **[jolt](https://github.com/jolt-lang/jolt)**, as |
| 5 | [glimmer](https://github.com/jolt-lang/glimmer) components painted by |
| 6 | **[Vidya](https://tangled.org/nandi.uk/vidya)**/egui. |
| 7 | |
| 8 | It is a proof of concept port of [sleek](../sleek), which is the same client in |
| 9 | Rust against egui directly. The screens are sleek's — connect, chats, chat, |
| 10 | discover, settings, under a tab bar — but each is hiccup over glimmer's widget |
| 11 | tags rather than immediate-mode drawing code, and state lives in ratoms instead |
| 12 | of an `AppState` struct. |
| 13 | |
| 14 | ``` |
| 15 | src/frq/irc.jolt IRC over TLS or TCP: parser, reader thread, JOIN/PRIVMSG/PING |
| 16 | src/frq/state.jolt the ratoms every screen reads, and `apply-msg!` |
| 17 | src/frq/app.jolt the screens |
| 18 | ``` |
| 19 | |
| 20 | ## Running |
| 21 | |
| 22 | `libvidya` from Vidya's Rust/egui backend, then the app: |
| 23 | |
| 24 | ```bash |
| 25 | just lib |
| 26 | just run |
| 27 | ``` |
| 28 | |
| 29 | `just run` is `jolt -M:frq` with `LD_LIBRARY_PATH` pointed at the built |
| 30 | library. It connects to `irc.freeq.at:6697` over TLS and joins `#test`. Untick |
| 31 | TLS on the connect screen (or point it at `127.0.0.1`) for a local server's |
| 32 | plain listener: |
| 33 | |
| 34 | ```bash |
| 35 | cargo run --release --bin freeq-server # in the freeq checkout |
| 36 | ``` |
| 37 | |
| 38 | ## Android |
| 39 | |
| 40 | An APK with two shared libraries and no Java: `libvidya.so` (vidya's Rust/egui |
| 41 | C ABI, which owns the event loop as the NativeActivity's own library) and |
| 42 | `libjoltapp.so` (frq compiled to a Chez boot image). Both native halves come |
| 43 | from the vidya checkout; only the boot image is frq's. |
| 44 | |
| 45 | ```bash |
| 46 | ./android/build-apk.sh run # build, install, launch on a connected device |
| 47 | ./android/build-apk.sh log # logcat, filtered |
| 48 | ``` |
| 49 | |
| 50 | Needs what vidya's Android build needs — SDK, NDK r29, and a cross-built Chez |
| 51 | in `~/.cache/vidya-chez-android`. |
| 52 | |
| 53 | TLS does not work there: jolt reaches OpenSSL through the dynamic loader, and |
| 54 | Android has no public `libssl` to load. The connect screen falls back to the |
| 55 | plain `:6667` listener on its own, which is why the plain transport is the raw |
| 56 | `socket`/`connect`/`send`/`recv` calls rather than jolt's `java.net.Socket` |
| 57 | surface — that surface does not work on Android either, while the syscalls do. |
| 58 | |
| 59 | ## What the PoC covers |
| 60 | |
| 61 | * TLS (`:6697`, via jolt.mvn-http's OpenSSL bindings) or plain TCP (`:6667`) |
| 62 | * Guest connect (`NICK`/`USER`), `001` welcome, `PING`/`PONG` keepalive |
| 63 | * Auto-joins `#test` on `irc.freeq.at` |
| 64 | * Join channels, channel buffers with unread counts, send and receive `PRIVMSG` |
| 65 | * Join/part notices, DMs bucketed under the sender's nick |
| 66 | * Discover list, search over buffers, disconnect |
| 67 | |
| 68 | ## Limits |
| 69 | |
| 70 | * **TLS and plain TCP only** — no WebSocket, no iroh. On Android, plain only. |
| 71 | * **Guest identity only.** No AT Protocol SASL, no OAuth, no credential gates, |
| 72 | no E2EE — the parts of freeq that need crypto are exactly the parts left out. |
| 73 | * **No scrollback trimming, avatars, reactions, threads, or calls.** |
| 74 | * Message lists are keyed vboxes; glimmer-vidya has no `:listbox` yet. |