This project uses Nix flakes to manage dependencies, ensuring a reliable and reproducible build environment. To get started:
- Install Nix or NixOS by following instructions at nixos.org/download.
- Enable Nix flakes as per the guide on NixOS Wiki.
Alternatively, install Cargo
and Rust
using the instructions found at Rust's official site.
To build the project:
- For a release build, run
nix build
. The resulting binary can be found at./result/bin/f0bot
. - For setting up a development environment with necessary dependencies, run
nix develop
. Inside this environment, you can compile the project withcargo build
.
- Use @BotFather to create a new Telegram bot, create a test chat with topics, and add the bot as an administrator.
- Copy
config.example.yaml
and adjust it as needed, particularly thetelegram.token
. - Start the bot with
cargo run bot my-config.yaml
.
This project follows these conventions:
- Code Style and Lints: Refer to the
./Justfile
. - Commit Messages: Conventional Commits.
- Metric Naming: Prometheus metric and label naming guidelines.