Do you remember the time when one developer broke half of the Internet? Earlier this year a package called left-pad was pulled from the NPM registry (a counterpart of crates.io for the JavaScript folks). This caused... some drama, to say th...
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 ch...
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. Th...
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 s...
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...
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. So...
clap is a fantastic Rust library for Command Line Argument Parsing. It's both easy to use and powerful - in the spirit of Rust philosophy - you get what you pay for. Simple CLI options are simple to define, while complex schemes (think git...
The zip crate is the most commonly used Rust library for manipulating ZIP archives. It supports reading and writing .zip files with different compression methods (store, deflate, bzip2). There are at least three crates for LZMA (de)compress...
Day 14 - cursive My first programming IDE back in the 90s was Borland Turbo Pascal. Since the PC that I used at that time was running MS-DOS, it meant no graphical interface. I was so surprised when I ran turbo.exe for the first time and sa...
tera is a pure Rust templating engine. Those familiar with Django, Jinja2 or Twig will feel right at home with tera, as its syntax is very similar. tera is still very young and may not be as feature complete as, say, Jinja2. However it is a...
Most of software developers are to some extent familar with Git. This version control system won our hearts even though it is not perfect. Practicality beats purity, as quoted from The Zen of Python. But Git is not only the git executable....
diesel is an in-development ORM (Object-Relational Mapper) for Rust. It aims to be a safe and efficient layer between your business logic and the database. In the words of its authors: Diesel gets rid of the boilerplate for database interac...
If you have a background in Python, Java or C++, you're probably used to raising exceptions if something goes wrong. Rust doesn't have exceptions. The official Rust book has a comprehensive chapter on error handling, but the TL;DR is we sho...
Today our focus is the derive_builder crate. It provides a macro to automatically generate setter methods for struct fields. And since all setters return the struct itself, we can chain them in a so called builder pattern. Builder and fluen...
Static variables are available throughout the entire life of a program. They are allocated in a block of memory known at compile time. Due to that, they tend to represent global state that the program can access. It's getting especially tri...
Two years ago I wrote an article about working with JSON in Rust. JSON (de)serialization support was then baked in the standard library. However, at that time Rust was at version 0.13 and a lot of things happened since then. Mainly, the rus...
Fact: I'm writing these articles and examples on a Windows machine and so far everything compiles and works as expected. Just so you know, Rust supports Windows in the top tier. I'm mentioning it here since a few people I talked to assumed...
It's entirely possible that you're walking a happy road of a programmer who never had to write a parser by hand. That's not my case unfortunately. I remember incomprehensible indexing of hideous arrays of characters, a maddening cascade of...
We learned the basic concepts of nom yesterday when we wrote a parser for HTTP headers. HTTP is by its nature a text protocol. nom however always works on bytes (byte array slices, denoted in Rust with &[u8]). This makes it perfectly suitab...
Welcome to the second edition of 24 Days of Rust! Two years ago in December 2014 the first edition was pretty well received by the Rust community. That was a hard time - we were still before the 1.0 release of the language. I had to keep up...