GSoC 2023: Rust and GTK 4 Bustle Rewrite (Final Overview)
Over the summer, for 12 weeks, I worked on rewriting Bustle in Rust and GTK 4 as part of the Google Summer of Code (GSoC) 2023 program. This post is an overview of the work done and the future plans for the project. Bustle is a graphical application used to analyze D-Bus activities. It uses sequence diagrams to present signal emissions and method calls messages. Bustle represents these messages using a row-based layout. Each row is dedicated to displaying the following information: the elapsed time since the first message, the message path, and the member, which could be the name of the emitted signal or invoked method. On the other hand, individual columns correspond to distinct D-Bus services. Bustle draws arrows that transverse these columns to visualize the communication between services, while arcs represent method invocations and returns. This visual paradigm is valuable as, for instance, it can be used to see which services a D-Bus application talks to and how often, which can be handy in debugging, enhancing security, and optimizing performance within the application. The ultimate goal of this project is to port Bustle to GTK 4 and rewrite it in Rust. Although the current implementation of Bustle in Haskell and GTK 3 is functional, there are compelling reasons to consider a rewrite in Rust. This includes enabling the tool to take advantage of a range of ergonomic libraries, including zbus, gtk4-rs, and pcap-file, that would ease the burden in maintenance. Furthermore, the growing Rust community and the availability of the Rust SDK in Flathub would make the tool more accessible to potential contributors and simpler to distribute to users. Porting the tool to GTK 4, on the other hand, would offer several benefits, such as access to newer and more performant widgets and drawing APIs like Altogether, a rewrite of Bustle in Rust and GTK 4 would provide advantages that can enhance the tool's functionality, maintainability, longevity, accessibility, and possibly efficiency. Most of the tasks in the original proposal have been completed. This includes having an initial MVP, porting GDBus usage to zbus, implementing file loading and saving, completing the recording functionality, and porting the UI, which comprises the diagram, details view, and services filter, to GTK 4. For more details on the work done, there are also bi-weekly updates on my blog. These are the summary of code that has been merged during the GSoC period. Most of the work done is in the Bustle GNOME GitLab repository, where the following pull requests have been merged: While the project is focused on Bustle, some changes are necessary to be upstreamed to other projects. This includes changes to zbus and gtk4-rs, where the following pull requests have been merged: Due to time constraints and unexpected issues, some of the pull requests are still pending review: While most of the tasks in the proposal have been completed, there are still a few things that need to be done, including the following: I have to say this is, so far, the most challenging part of my software development journey. It felt like a hackathon since I had to understand things and create something that works quickly. While it was challenging, it was also rewarding as I was able to learn a lot of things and create something that I am proud of. There were moments of time pressure and frustration, but with experimentation, collaboration, and a lot of reading, I was able to overcome these challenges and make meaningful progress. The complexity of the project pushed me out of my comfort zone, forcing me to delve into unfamiliar areas of programming and technology. Lastly, I would like to express my gratitude to my mentors, Bilal Elmoussaoui and Maximiliano Sandoval, for tirelessly reviewing my pull requests and guiding me. I would also like to thank the GNOME Foundation and the community, especially the GNOME GSoC admin, Felipe Borges, for giving me the opportunity to work on this project. I would also like to extend my appreciation to zbus maintainer, Zeeshan Ali Khan, for their help in getting my pull requests merged against zbus and to the original Bustle developer, Will Thompson, for their guidance. Finally, I would like to thank my family and friends for their support and encouragement. About Bustle
Project Goal
GtkListView
and GskPath
. This would allow Bustle to benefit from the latest developments in the platform and remain current with evolving standards. Work Done
Snapshots
Diagram and Details View
Recording and Services Filter
Code Merged
Bustle
zbus and gtk4-rs
zbus
gtk4-rs
Code to be Merged
Future Plans
dbus-monitor
process Final Words