Road to the asynchronous Rust
Notification daemon
- usign D-Bus for catching notifications.
- using tokio for async.
- draw simple but stylish boxes around notifications.
- supports window resizing.
- supports immortal notifications as well as mortal.
- supports all apps using D-Bus interface.
Web server
- serving requests concurrently.
Read "Installation" from 'The Rust Programming Language' book.
$ git clone https://github.com/khadievedem/rust_async.git
$ cd rust_async
Run notification daemon project with
$ cargo run --bin notification_daemon
or web server
$ cargo run --bin web_server
localhost:7878/
hello world page
./web_server/src/hello.html
localhost:7878/sleep
sleep for a 10 seconds (in order to test concurrency)
localhost:7878/smthfkwejfllkdk
Ooops! :-)
./web_server/src/404.html
Run the app according to Clone & Run section.
press 'q' to exit.
- Huge absorption of information about programming in Rust.
- Read Rust async-book.
- Create web-server following guide in the Rust async-book.
- Migrate from async-std to
tokio
(web-server
) - Brainstorm on example project topics.
- Decide which project will best demonstrate async working (under Linux)
See more about my decision at: FAQ section
- Read how communication between apps works in Linux.
- Study the D-Bus Notifications Specification.
- Create simple application using
zbus
(crate for D-Bus) - Write an interface for catching notifications.
- Brainstorm on showing notifications to the user.
- Unsafe
QT
drawing attempts. -
GTK
drawing attempts.
See about problems with GUI at: FAQ section
- TUI drawing using
console-engine
.
- Brainstorm on concurrent connection of drawing and catching notifications.
- Async notification catching.
- Async notification boxes drawing.
- Set up communication between catcher and drawer using
tokio mspc
channel.
My very first idea was to implement my own Windows Manager. But there was one major problem - asynchronous Windows Manager sounds really weird, it must use multithreading. So I started looking for other interesting ideas to implement.
Notification daemon was selected, because in addition to async programming I learn in detail D-Bus, as well as writing an application that interacts with other programs.
As you can see in qt-notifications branch I've tried to implement graphical notificaitons using
qt
as well asgtk
. But I faced a problem connected with my Windows Manage (I use 'sway' BTW). Tiling WMs can't draw a pop-up window in the corner. Instead they draw it right in the center. To draw notifications in the corner, I would have to work withwinit
, but that would take a very long time. After all, the main goal of the project -> learn async Rust, not to work with graphics. That's why I chose the Terminal application.