Rust is a great programming language that is trending very positively nowadays. It was initially advertised as a systems programming language, along with other famous languages like C or Go(lang). Indeed, it is gradually finding its way into the Linux kernel: it is currently confined to drivers and modules, but its intrinsic qualities—mainly expressiveness, memory safety, and performance—will certainly open doors to more crucial parts of the operating system. At a slower pace, Rust is also making inroads into the still-confidential realm of WebAssembly (WASM), in the browser or in the serverless cloud.
Just like with Go, innovative developers have shown that Rust’s applicability goes beyond systems programming and that it can be used, for example, to develop efficient web application backends supported by databases.
In this first part of the book, we will develop a simple yet representative web application using REST web services, backed by a relational database. We won’t address the UI aspects yet; those will be handled in the second part of the book. In this part of the book, we will build the foundations for our web application, thinking big but starting small. We will then address increasingly specialized topics, such as database persistence, error handling, and API maintenance and refactoring.