Rust 2018

Per the call for blog posts, I’ve got thoughts and ideas on where Rust can go in the upcoming year. My wants haven’t changed much over the last year or so: give me non-embarassing compilation speed! 😁 Before getting started, I’m very appreciative of the hard work put into the overall Rust community and ecosystem, including the behind-the-scenes work. It’s difficult to understate just how much time and energy people volunteer in pursuit of a better, Rust-ier world.

Rusoto: 2017 in review

Rusoto, an unofficial SDK for Amazon Web Services, had a wonderful year! We made great strides in improving functionality, increasing the number of services covered and making various ergonomic changes. Improved functionality Added all publicly available AWS regions Custom endpoint support HTTP connection pools for connecting to services S3 supports streaming responses: no more loading the entire file to download into a Vector More supported services A non-exhaustive list:

Test driven development with Rust

Test Driven Development (TDD) encourages better software design. When the desired behavior is known and expressible, it’s highly effective to make modular and easily tested code. Let’s take a look at using TDD with Rust, using release-party as an example. What we’re changing Release-party is a command line tool I made for my day job. We’ve got a fair amount of repositories on GitHub: one for each microservice. Our deployments are automated through TravisCI: the master branch is deployed to our testing environment and the release branch is deployed to production.

Software development force multipliers

While a software enginerd/pixie wrangler at heart, I’ve discovered the stereotypical developer path of grabbing a ticket from Jira, working on it, shoving the results to QA and repeat isn’t for me. The biggest reason is how this leaves a tremendous amount of efficiency on the table. This inefficient approach is difficult to reconcile with empathy for the customer buying and using the product. My code writing speed has peaked: I can’t write code any faster.

RustConf 2017 recap

My recap of RustConf 2017 in Portland, Oregon. Or: how I avoided hotel surge pricing during the eclipse weekend! RustConf the second I’ve been told the first conference for community or technology is the best. I’m happy to report I don’t believe it applies in this case! The first RustConf set a tone of possibility and potentials whereas RustConf 2017 focused more on the progress made in the language, ecosystem and community.

Rusoto codegen, part three

This is part three of Rusoto code generation. The first two parts went over how code inside a crate is generated. In this post, we’ll take a look at how we make the crate for an AWS service. Parts one and two recap In the previous two posts, we followed code generation from the Simple Queue Service (SQS) botocore service definition to Rust code. We glossed over where the generated code went in order to concentrate on the generation itself.

Rusoto codegen, part two

In the previous post we took a quick tour of the major pieces of Rusoto code generation. In this post we’ll get deeper into code generation for the Simple Queue Service. Picking up from part one Part one described a few parts of Rusoto codegen: Finding which services to generate Making the service’s crate Generating the service and placing it inside its crate rustfmt the generated code to make it look pretty Step three is where this post will concentrate.

Rusoto codegen

Writing a software development kit (SDK) is a challenge. Especially when the target has a tremendous number of services, endpoints and different styles of interacting, such as REST, querystring and “other.” Rusoto uses the botocore service definitions to create Rust code to interact with Amazon Web Services. Let’s dive into how it’s done! Using Simple Queue Service as an example To make this post clearer, we’ll follow the Simple Queue Service (SQS) from botocore service definition to the rusoto_sqs crate.

Rusoto RDS walkthrough, mk 2

Since the publication of Rusoto RDS walkthrough, a new version of Rusoto has been released: 0.25.0. This includes some breaking changes so let’s work through those. We’ll also be cleaning up some of the rougher edges in the previous walkthrough. rusoto-rds-mk2 The previous project’s source code is on github. We’ll be making a new project based off that one. You can see the final product in rusoto-rds-mk2 folder. Cargo.toml changes required for Rusoto 0.

Rusoto RDS walkthrough

Let’s tie some great Rust crates together! In this walkthrough, we’ll use Rusoto to create a Postgres RDS database instance, Rocket.rs to make a web server and Diesel to talk to the database on AWS to make a proof of concept hit counter. Walkthrough overview There are two projects in this walkthrough. First is rusoto-rds. This creates the Amazon Web Services (AWS) Relational Database Service (RDS) instance and should be run first.