#matrix-chat #hackerspaces #alertmanager #chat #rcb

bin+lib rdzobot

Modular, but monolithic Matrix bot

1 unstable release

Uses new Rust 2024

new 0.1.0 May 7, 2025

#4 in #hackerspaces

41 downloads per month

AGPL-3.0-or-later

160KB
3K SLoC

Rust 3K SLoC // 0.0% comments Python 329 SLoC // 0.1% comments SQL 28 SLoC // 0.1% comments

Rdzobot: Rządowe Dzentrum Bezpieczeństwa na skalę naszych możliwości

Rdzobot is a framework for writing Matrix bots in Rust programming language. Included are several modules:

  • autojoin: Automatically join channels when invited, and owner can instruct the bot to !leave any channel.
  • [log]: Logs room events to files.
  • parcels: Generates QR codes for parcel lockers (currently supported operators: InPost and Orlen Paczka) and tracks parcel deliveries.

There are also two example-quality modules, used mostly in Warsaw Hackerspace:

  • hswaw: Assorted tooling for HS.
  • newag: Adds !rozprawa command, which queries when will be the next hearing in the civil case filed by Newag agains the Hackers.

Build

apt-get install \
    libssl-dev \
    libsqlite3-dev \
    libpython3-dev \
    #
cargo build --release

Run

RDZB_PASSWORD=... ./target/release/rdzb-login
PYTHONPATH=. ./target/release/rdzb

## Log configuration

`/etc/systemd/system/rdzobot.service.d/log.conf`:

```ini
[Service]
Environment=RUST_LOG=rdzobot=debug,rdzb=debug,matrix_sdk=warn

https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives

Dependencies

~61–82MB
~1.5M SLoC