🚨 EXTREMELY WORK IN PROGRESS 🚨
Create a Rust interface for the Signal messaging app that can be used for account automation (bots, mailing lists, etc).
A device running NixOS or a device running another Linux distro with Nix installed. If your device is Windows, use WSL.
git clone https://github.com/jlgingrich/signalman
code signalmanThis will set the default terminal for the workspace as a Nix Shell that contains the neccesary requirements (see shell.nix). All further steps assume you're either running them in the VS Code default terminal, have opened the Nix shell in your other terminal, or otherwise have the requirements installed in your environment.
./scripts/signal-cli-initThis will print a QR code to the terminal output that can be scanned in the Signal app to link Signalman to your account.
./scripts/signal-cli-run-daemonThis runs Signal-CLI, serving requests via JSON-RPC over a Unix domain socket service.
anyhowfor handling of non-domain errors.- Definitely not sure this is idiomatic, but I do like the additional context it can give returned errors.
clapfor parsing command-line arguments.jsonrpc-typesfor JSON RPC types to serialize to and from.- The other JSON RPC libraries seem to be either application-specific, assume a TCP or HTTP transport, or are designed to create servers, not clients.
serdefor JSON serialization.tokiofor the async runtime and IO.
Implement Signalman in Rust as a client app interacting with a Signal CLI daemon using a Unix domain socket.
Implement Signalman purely in Rust, using the libsignal Rust library directly.
- Able to read and deserialize JSONRPC notifications from a socket!
- Able to write JSONRPC to the socket and receive the response
- Combine the two into one module, and create a really basic bot that replies to direct messages
