How fullzer4/dusty works
Project type and purpose
• From the README and file-tree, we see this is a Rust-based Linux notification library (Dusty) that provides a CLI/daemon binary for sending desktop notifications.
• It is not a full-stack web app or microservices ecosystem, but rather a systems-level library/tool integrating with Linux’s D-Bus and systemd.
File structure
• Top level
• Cargo.toml / Cargo.lock / .cargo/: Rust build and dependency configuration
• src/main.rs: the entry point for the Dusty binary (and library exports, if any)
• dusty.service: systemd unit file to run Dusty as a daemon/service
• install.sh: install script that copies the binary and unit file into appropriate system paths
• No separate “frontend” or “backend” folders; this is a single binary that acts as both library and CLI/daemon.
README for additional insights
• Confirms “Modern Linux notification library in Rust”
• Early development; likely uses crates such as “dbus” or “notify-rdev” under the hood (you’d see these in Cargo.toml dependencies)
a. Main components
• User/Client (could be a script, another Rust program, or manual CLI invocation)
• Dusty Binary (the compiled Rust executable)
• D-Bus System Bus (IPC mechanism on Linux)
• Notification Daemon (e.g., notify-osd, dunst)
• systemd (when running as a service via dusty.service)
• install.sh (deployment step; not part of runtime but part of the delivery pipeline)
b. Relationships and interactions
1. User invokes dusty CLI or calls Dusty API from another Rust program → Dusty Binary
2. Dusty Binary formats the notification message and issues a D-Bus call on the System Bus
3. The Linux Notification Daemon (registered on D-Bus) receives the call and displays the notification
4. If deployed as a long-running service, systemd launches the Dusty service (dusty.service) at boot; it then listens on a socket or D-Bus to receive notification requests
c. Architectural patterns / design principles
• Single responsibility: binary handles both library API and CLI/daemon logic
• Modular layering:
– CLI/API layer (main.rs)
– D-Bus communication layer (dbus crate)
– System integration layer (systemd unit file)
• Separation of deployment (install.sh + dusty.service) from runtime logic
d. Key technologies / libraries
• Rust & Cargo (build system, dependency management)
• dbus crate (for IPC with the notification bus)
• systemd (unit file provided)
• Shell script (install.sh for deployment)