nandi/frqpublic Fork 0
519212433a48e1f2acfe707a7b4ac4c6aaaf4fd8
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.

README.md · 94 lines · 3.8 KBmarkdown Blame HistoryRaw
A freeq client in jolt, as glimmer components on Vidya 4719d6f nandi 20d ago1# frq
2
3A **[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
8It is a proof of concept port of [sleek](../sleek), which is the same client in
9Rust against egui directly. The screens are sleek's — connect, chats, chat,
10discover, settings, under a tab bar — but each is hiccup over glimmer's widget
11tags rather than immediate-mode drawing code, and state lives in ratoms instead
12of an `AppState` struct.
13
14```
Sign in with a Bluesky identity 5192124 nandi 20d ago15src/frq/atproto.jolt handle → DID → PDS → session, and the SASL payload
16src/frq/irc.jolt IRC over TLS or TCP: parser, reader thread, SASL, PRIVMSG
A freeq client in jolt, as glimmer components on Vidya 4719d6f nandi 20d ago17src/frq/state.jolt the ratoms every screen reads, and `apply-msg!`
18src/frq/app.jolt the screens
19```
20
21## Running
22
23`libvidya` from Vidya's Rust/egui backend, then the app:
24
25```bash
26just lib
27just run
28```
29
30`just run` is `jolt -M:frq` with `LD_LIBRARY_PATH` pointed at the built
31library. It connects to `irc.freeq.at:6697` over TLS and joins `#test`. Untick
32TLS on the connect screen (or point it at `127.0.0.1`) for a local server's
33plain listener:
34
35```bash
36cargo run --release --bin freeq-server # in the freeq checkout
37```
38
Sign in with a Bluesky identity 5192124 nandi 20d ago39## Signing in
40
41Guest is the default. The **Bluesky** tab on the connect screen takes a handle
42and an [app password](https://bsky.app/settings/app-passwords) and signs in
43through AT Protocol:
44
451. `com.atproto.identity.resolveHandle` turns the handle into a DID
462. the DID document (PLC directory, or the domain for `did:web`) gives its PDS
473. `com.atproto.server.createSession` mints a session token there
484. freeq's SASL `ATPROTO-CHALLENGE` carries that token as `method:
49 "pds-session"`, with the server's own nonce echoed back so it cannot be
50 replayed elsewhere
51
52The app password goes to the user's own PDS and nowhere else — freeq is handed
53only the token, and verifies it by asking that same PDS. It is not written to
54disk, and is dropped from memory once the session exists.
55
56A refused sign-in is reported and the connection continues as a guest.
57
A freeq client in jolt, as glimmer components on Vidya 4719d6f nandi 20d ago58## Android
59
60An APK with two shared libraries and no Java: `libvidya.so` (vidya's Rust/egui
61C ABI, which owns the event loop as the NativeActivity's own library) and
62`libjoltapp.so` (frq compiled to a Chez boot image). Both native halves come
63from the vidya checkout; only the boot image is frq's.
64
65```bash
66./android/build-apk.sh run # build, install, launch on a connected device
67./android/build-apk.sh log # logcat, filtered
68```
69
70Needs what vidya's Android build needs — SDK, NDK r29, and a cross-built Chez
71in `~/.cache/vidya-chez-android`.
72
73TLS does not work there: jolt reaches OpenSSL through the dynamic loader, and
74Android has no public `libssl` to load. The connect screen falls back to the
75plain `:6667` listener on its own, which is why the plain transport is the raw
76`socket`/`connect`/`send`/`recv` calls rather than jolt's `java.net.Socket`
77surface — that surface does not work on Android either, while the syscalls do.
78
79## What the PoC covers
80
81* TLS (`:6697`, via jolt.mvn-http's OpenSSL bindings) or plain TCP (`:6667`)
82* Guest connect (`NICK`/`USER`), `001` welcome, `PING`/`PONG` keepalive
83* Auto-joins `#test` on `irc.freeq.at`
84* Join channels, channel buffers with unread counts, send and receive `PRIVMSG`
85* Join/part notices, DMs bucketed under the sender's nick
86* Discover list, search over buffers, disconnect
87
88## Limits
89
90* **TLS and plain TCP only** — no WebSocket, no iroh. On Android, plain only.
Sign in with a Bluesky identity 5192124 nandi 20d ago91* **App-password sign-in only.** No OAuth broker, no `did:key` signing, no
92 credential gates, no E2EE. Sign-in needs TLS, so it is desktop-only.
A freeq client in jolt, as glimmer components on Vidya 4719d6f nandi 20d ago93* **No scrollback trimming, avatars, reactions, threads, or calls.**
94* Message lists are keyed vboxes; glimmer-vidya has no `:listbox` yet.