Skip to content
barafaelPublic

About

A Signal client for the desktop, in Rust and Slint: Linux, macOS and Windows

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

788 Commits

Folders and files

Repository files navigation

b33p

A cross-platform Signal client for the desktop, built with Rust and Slint. It links as a companion device, keeps an encrypted local store, and lives in the tray between messages.

A conversation in b33p: a sent message with markdown and a read receipt, the echo, a reaction, a voice message and a link preview above

The chat list A conversation with attachments and notices A draft in the composer
A group chat A message request waiting to be accepted The desktop's dark scheme

In the desktop's dark scheme, and in the other widget style the settings offer:

Dark scheme Fusion, light Fusion, dark

In motion: an agent selects a chat, types word by word, sends, and watches the message get read, answered and reacted to:

A recording: the chat list, a conversation, typing, sending, the read receipt, the echo, a reaction, the group

What works

  • Linking (with message history transfer), relinking, encrypted store (keyring or password)
  • Read state and receipts, delivery ticks, typing indicators, edits and deletions, disappearing messages, markdown formatting, mentions
  • Message requests, blocking, pinned / muted / archived chats, pinned messages, folders, Note to Self
  • Groups: create, rename, describe, timer, members and admins, leave, invitations
  • Attachments: pictures, voice messages and audio playback, files, stickers, link previews, paste and drag-and-drop
  • Search in a chat and in the chat list, media overview, forwarding, stories
  • Desktop notifications with click-to-open and inline reply; per chat, only for mentions and replies, without the text, or without a sound (on Linux, if the desktop honours that)
  • Tray icon, single instance, keyboard shortcuts, screen-reader labels, reduced-motion support
  • A screen for what goes wrong at the start, with ways out: try again, start over, unlink

Payments and calls are out of scope. b33p is young: see PLAN.md for where it stands, TESTPLAN.md for what is checked by hand, and CHANGELOG.md for what changed. It is not made or endorsed by Signal.

Installing

Each release has builds for x86_64 and arm64. On the first start b33p shows a code: on your phone, open Signal → Settings → Linked devices → Link new device, and scan it.

Linux (Debian 12, Ubuntu 23.04, Fedora 38 or newer):

  • The AppImage: chmod +x b33p-*.AppImage and run it.
  • The .deb: sudo apt install ./b33p-*.deb.
  • The tarball: put its b33p on your PATH and its .desktop file and icon in ~/.local/share/applications/ and ~/.local/share/icons/hicolor/scalable/apps/.

b33p draws with Skia, on the GPU through Vulkan, or through OpenGL if there is no Vulkan driver.

macOS (11 or newer): open the .dmg and drag b33p to Applications. The app isn't notarized, so macOS refuses to open it at first: right-click it in Applications → Open → Open, or run xattr -dr com.apple.quarantine /Applications/b33p.app. There are no notifications on macOS yet.

Windows (10 or newer): unpack the .zip and run b33p.exe. It installs itself for you alone, without admin rights: to %LOCALAPPDATA%\b33p\b33p.exe, with a Start menu entry and one in Installed apps, which also removes it (and your data, if you say so). A newer version installs over an older one; an older one never replaces a newer, it starts the installed one. B33P_NO_INSTALL=1 runs it where it is. It isn't signed, so SmartScreen may stop it: More info → Run anyway.

Where b33p keeps things

Linux macOS Windows
Messages and keys ~/.local/share/b33p ~/Library/Application Support/io.github.barafael.b33p %APPDATA%\barafael\b33p\data
Log ~/.local/share/b33p/logs the same, logs %LOCALAPPDATA%\barafael\b33p\data\logs
Settings ~/.config/b33p ~/Library/Application Support/io.github.barafael.b33p %APPDATA%\barafael\b33p\config
The program where you installed it /Applications/b33p.app %LOCALAPPDATA%\b33p\b33p.exe

The database is encrypted with a key kept in the system keyring (or, without one, derived from a password you choose). Settings → About opens the log folder.

Reporting a problem

Open an issue with what you did, what happened, and the log (b33p.log, and b33p.log.1 if it is there). The log leaves out messages, names, numbers and IDs, but look it over before you attach it. RUST_LOG=debug makes it more detailed.

Building and running

You need Rust. On Linux the window is Slint's own (winit) with Skia; the Slint client's gpu-femtovg feature draws with FemtoVG instead. The dev container has everything for Linux, on the Debian 12 the releases are built on; its install-deps.sh lists the Debian packages.

On Windows (x86_64) you also need CMake and NASM, which BoringSSL (contact discovery) builds with: scoop install cmake nasm or winget install Kitware.CMake NASM.NASM, with both on PATH.

cargo run --release -p b33p-slint    # the real client
cargo run -p b33p-slint              # the same, unoptimized
B33P_MOCK=1 cargo run -p b33p-slint  # an offline fake, for trying the UI: nothing is sent

The same client with its window drawn by GPUI instead of Slint is b33p-gpui (cargo run -p b33p-gpui, B33P_MOCK=1 likewise; it needs Vulkan and the Wayland or X11 libraries): see b33p-gpui/README.md.

The Android app is b33p-dioxus, built with dx rather than cargo run: just android-mock builds it on the offline fake for the emulator, just android-phone the real client for a phone. What to install first, and what works, is in b33p-dioxus/README.md.

B33P_MOCK only works in debug builds — a stray variable in the environment must not turn a release binary into a convincing fake that swallows messages. The mock's window says so in its title, and it answers whatever you send.

Layout

Crate What it is
b33p-core The chat state and the backends: the real Signal backend (over presage) and the mock. A headless state machine: events in, updates out; actions return commands.
b33p-slint The window: Slint UI wired to the chat state, tray, notifications playback, and the agent harness.
b33p-gpui The same window drawn with GPUI: the same features, its own look.
b33p-dioxus The Android app: the same client with its screens drawn by Dioxus in the system's WebView, for a phone. Early: see its README.
b33p-platform What the windows ask of the desktop, whichever toolkit draws them: one copy of b33p, the log, autostart, the clipboard, audio, reduced motion, file dialogs.
b33p-notify Desktop notifications with click-to-open and inline reply.
b33p-harness The agent harness's protocol, for the window and for whatever drives it.
xtask cargo testbox: brings the test box up and down and runs its checks.

testbox/ holds the test box's images, pod and drivers (testbox/README.md).

Driving the UI without mouse or keyboard: the agent harness

For tests and demonstrations, the UI can be driven by a script. With the harness feature built in and B33P_AGENT_SOCKET pointing at a path, the app listens on a Unix socket where an agent reads what the window shows and acts as if it were the input — through the same code paths a person's clicks and keystrokes take. The protocol is one JSON document per line:

→ {"id":1,"method":"snapshot"}
← {"id":1,"result":{"screen":{"name":"chats"},"conversations":[…],"messages":[…],"draft":"", …}}
→ {"id":2,"method":"act","action":{"type":"select","conversation":"c:alice"}}
← {"id":2,"result":{"command_sent":true}}
→ {"id":3,"method":"subscribe"}
← {"id":3,"result":{"seq":0}}
← {"event":"update","seq":1,"snapshot":{…}}          // pushed after every redraw

Actions cover navigation, messaging, groups, settings and more — see the Action enum in b33p-slint/src/agent.rs, which also documents the protocol; b33p-slint/tests/harness.rs is a working client. The socket's file is 0600, so only programs of your own user can connect, and it carries message plaintext: point B33P_AGENT_SOCKET into a private directory.

The harness never exists in a release build:

B33P_MOCK=1 B33P_AGENT_SOCKET="$XDG_RUNTIME_DIR/b33p-agent.sock" \
    cargo run -p b33p-slint --features harness

The screenshots above were taken that way: a script opened the mock, clicked around, and captured the window at each step.

Tests

cargo test                                # unit tests and the window's own behaviour
cargo test -p b33p-slint --features harness   # end-to-end: drives the mock over the harness

just check runs what CI checks: formatting, clippy, the tests, cargo-deny and zizmor; just lists the other tasks.

Against Signal's own server and clients, without reaching Signal: the test box runs Signal-Server, Signal-Desktop and Signal-Android in a Podman pod with no egress, and checks b33p against them (Linux with rootless Podman; Android needs /dev/kvm). See testbox/README.md for what it needs and how to run it:

cargo testbox test                # every phase
cargo testbox test core           # one
cargo test -p xtask -- --ignored  # every phase, as a test

License

AGPL-3.0-only. b33p links libsignal and presage, which are AGPL, so the whole work is.

About

A Signal client for the desktop, in Rust and Slint: Linux, macOS and Windows

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages