24 days of Rust - conclusion

This article marks the end of the second edition of 24 days of Rust. I hope you enjoyed it and maybe found inspiration for a project or two. I sure did :-) Some of the libraries I wrote about are familiar to almost entire Rust community. Some are fairly obscure but I find them interesting. Regardless, I learned a lot just by writing, trying to come up with meaningful code examples and editing my drafts. This was my intention all along - to learn something for myself while contributing these articles to the community.

Continue reading »
Written on Dec. 24, 2016

24 days of Rust - built with Rust

Today's article is another throwback to the first edition of 24 days of Rust. In one of the final posts I wrote about interesting projects built with Rust. That was even before the language hit version 1.0. Two years later and we're at 1.14. Servo, iota and coreutils are still going strong. It's surely worth checking them out again, but I'm going to introduce a few more Rust projects that emerged during the last two years.

Continue reading »
Written on Dec. 23, 2016

24 days of Rust - lettre

lettre is a library to send emails over SMTP from our Rust applications. Like many other crates in the growing, but still young Rust ecosystem, it is still a work in progress. But while there are a few features missing from lettre, we can send some emails right now!

Continue reading »
Written on Dec. 22, 2016

24 days of Rust - app_dirs and preferences

Today we're going to take a brief look at two crates from the same author - Andy Barron. The first of them is app_dirs - a useful library to find platform-dependent directories, such as application configuration, data directory or cache. The second crate for today is preferences, which provides a simple way of managing user preferences and other data relevant to our program.

Continue reading »
Written on Dec. 21, 2016

24 days of Rust - reqwest

In the first volume of 24 Days of Rust, I've written about hyper as the Rust HTTP toolkit. A lot of things have changed in the last two years, but hyper is still the best solution for HTTP in Rust. However, hyper is undergoing some major changes to use tokio for async I/O. While this will be fantastic for use cases where performance is top priority, it will also make hyper APIs a bit more complex. It's good to know about event loops, futures and services, but sometimes we just want to send a GET request and call it a day.

Sean McArthur created Reqwest specifically for such scenarios. It is a high level HTTP client built on top of hyper. The situation here is somewhat similar to Python, where requests provides a simple API on top of heavy urllib3 machinery. Reqwest is relatively new compared to requests, but it has the same goal - to make simple HTTP requests easy and delegate complex tasks to hyper.

Reqwest also uses OS-provided TLS support if possible. This avoids a lot of pain setting up OpenSSL on Windows.

Continue reading »
Written on Dec. 20, 2016