Posts

Showing posts with the label Rust

zbus and Implementing Async Rust API

Image
zbus As many of the readers already know, for the past (almost) 2 years, I've been developing a Rust-crate for D-Bus, called zbus . With this being my first big Rust project to start from scratch done almost entirely in my spare time, the progress was rather slow for many months. My perfectionism didn't help much with the progress either but also the fact that implementing a Serde API for the D-Bus format was quite challenging. Then along came my old friend and ex-colleague, Marc-André Lureau who sped up the progress 10 times and soon after we had the 1.0 release of zbus. While my original plan (perfectionism again) was for the API to be primarily async, with the synchronous API mostly just a wrapper around it, it was Marc-Andre who ended up doing most of the work and coming up with nice high-level API and his use case was primarily synchronous so we decided to go with synchronous API first. I still believe that was the right thing to do, since neither of us were fam

GNOME+Rust Hackfest #4

Image
Last week, I had the pleasure of attending the 4th GNOME+Rust hackfest in Thessaloniki, Greece. While other folks were mainly focused on the infrastructure work , with my Rust being extremely rusty as of late, I decided to do something that tests the infra instead. More specifically, I took up on Sebastian's challenge of "Maybe someone should write a gst-inspect replacement in Rust". I am happy to report that by the end of the hackfest, I already have an implementation that covers 30% of the typical usage of gst-inspect. This implementation also comes pre-built with paging by default (which I only recently added to the current gst-inspect) and colored output ( MR on existing gst-inspect still pending review). I did run into some rather interesting issues though but there was always someone who could help me out. One specific one was on how best to pipe the output in Rust to a pager. This took more than a day and my implementation was mostly very similar to the one I

Joining Collabora

Last Thursday was my last day at Kinvolk . While Kinvolk is a great company run by very nice and talented folks and I really hoped to work there for a very long time, unfortunately it turned out to be not the best fit for me. While I am sad to leave, I am also very excited to join Collabora in their multimedia team. Today is my first day there. Since Collabora does not exist in Germany, I will be working for them as a consultant and had to register my own one-man company. Yes, I will be staying in Berlin and work from home. I have known Collabora from its very early days, when it was just a few developers with a vision and passion for Open Source. I also worked very closely with Collabora over the years during the good old Nokia Maemo/Meego times. I always had great appreciation for their work and commitment to Open Source, which is a huge challenge for a consulting company. While I do not yet know which specific projects I will be involved in at Collabora, I'm most likely

My journey to Rust

As most folks who know me already know, I've been in love with Rust language for a few years now and in the last year I've been actively coding in Rust. I wanted to document my journey to how I came to love this programming language, in hope that it will help people to see the value Rust brings to the world of software but if not, it would be nice to have my reason documented for my own sake. When I started my professional career as a programmer 16 years ago, I knew some C, C++, Java and a bit of x86 assembly but it didn't take long before I completely forgot most of what I knew of C++ and Java, and completely focused on C. There were a few difference reasons that contributed to that: Working with very limited embedded systems (I'm talking 8051 ) at that time, I quickly became obsessed with performance and C was my best bet if I didn't want to write all my code in assembly. Shortly before I graduated, I got involved in GStreamer project and beca

Ich bin ein Berliner

Well, no, not really but maybe I'll be able to claim that at some point because I'm moving to Berlin to join Kinvolk. I'm told that I'm changing countries and companies too often but that's not true. I was at Red Hat for 5 years and at Nokia before that for 5 years as well. The decision to move out of Finland was not exactly mine. Regarding Pelagicore I'm not as much leaving Pelagicore as I'm leaving the automotive industry, more specifically the software side of it. While the automotive industry is changing and mostly for the good, I realized that it still is not a place for me. Things typically move very slowly in this industry and I realized that I don't have the required patience for it. Also, C++/Qt are big here and while an year ago I thought it's just another language and Open Source UI framework, I no longer think so. Since you can find a lot of rants from very experienced C++ developers on why C++ is a horrible language, I won't rant

Introducing gps-share

So yesterday, I rolled out the first release of gps-share. gps-share is a utility to share your GPS device on local network. It has two goals: Share your GPS device on the local network so that all machines in your home or office can make use of it. Enable support for standalone (i-e not part of a cellular modem) GPS devices in Geoclue. Since Geoclue has been able to make use of network NMEA sources since 2015, gps-share works out of the box with Geoclue. The latter means that it is a replacement for GPSD and Gypsy . While "why not GPSD?" has already been documented , Gypsy has been unmaintained for many years now. I did not feel like reviving a dead project and I really wanted to code in Rust language so I decided to create gps-share. Dependencies While cargo manages the Rust crates gps-share depend on, you'll also need the following on your host: libdbus libudev libcap xz-libs Supported devices gps-share currently only supports GPS devices tha

Rust Memory Management

In the light of my latest fascination with Rust programming language, I've started to make small presentation about Rust at my office , since I'm not the only one at our company who is interested in Rust. My first presentation in Feb was about a very general introduction to the language but at that time I had not yet really used the language for anything real myself so I was a complete novice myself and didn't have a very good idea of how memory management really works. While working on my gps-share project in my limited spare time, I came across quite a few issues related to memory management but I overcame all of them with help from kind folks at #rust-beginners IRC channel and the small but awesome Rust-GNOME community. Having learnt some essentials of memory management, I thought I share my knowledge/experience with folks at the office. The talk was not well-attended due to conflicts with other meetings at office but the few folks who attended were very interested an

GNOME ❤ Rust Hackfest in Mexico

Image
While I'm known as a Vala fanboy in GNOME, I've tried to stress time and again that I see Vala as more a practical solution than an ideal one. "Safe programming" has always been something that intrigued me, having dealt with numerous crashes and other hard-to-debug runtime issues in the past. So when I first heard of Rust some years back, it got me super excited but it was not exactly stable  and there was no integration with GNOME libraries or D-Bus and hence it was not at all a viable option for developing desktop code. Lately (in past 2 years) things have significantly changed. Not only we have Rust 1.0 but we also have crates that provide integration with GNOME libraries and D-Bus . On top of that, some of us took steps to start converting some C code into Rust and many of us started seriously talking with Rust hackers to make Rust a first class programming language for GNOME. To make things really go foward, we decided to arrange a hackfest , which took place