Learn to buildreliable and efficient software in Rust

Rust Adventure is an ever-growing collection of courses designed to help you put Rust into production through real-world projects.

Get a head start with my free 5-Part email course.

What is Rust Adventure?

Rust doesn't have to be scary

Photograph by Sandra Iglesias

Rust is often taught from the C perspective which can leave developers that use higher level languages wondering if Rust is even relevant for them... but the power of Rust is that it empowers everyone to build reliable and efficient software.

Rust Adventure takes a different approach.

Focusing on practical real-world projects means that new concepts like Ownership and Borrowing will actually stick. Rust Adventure doesn't force you to learn C before learning Rust.

Get StartedChoose a Guided Path

Dig in to your preferred focus area, from writing your first Rust program to expertly applying new crates. Here's a sampling of what paths Rust Adventure offers.

#[tokio::main]
async fn main() -> Result<(), Error> {
    let handler_fn = service_fn(handler);
    lambda_runtime::run(handler_fn).await?;
    Ok(())
}

async fn handler(
    event: LambdaEvent<ApiGatewayV2httpRequest>,
) -> Result<ApiGatewayV2httpResponse, Error> {
    let (_event, _context) = event.into_parts();

    let response = format!(
        "{}",
        event.path_parameters
             .get("pokemon")
             .unwrap_or("world")
    );

    Ok(ApiGatewayV2httpResponse {
        status_code: 200,
        headers: HeaderMap::new(),
        multi_value_headers: HeaderMap::new(),
        body: Some(Body::Text(response)),
        is_base64_encoded: Some(false),
        cookies: vec![],
    })
}

Services and APIs

The Serverless Path

Rust’s focus on zero-cost abstraction mean that Serverless Functions boot and run faster, often in just milliseconds, while being as easy to use as JavaScript.

Write your first Serverless function without worrying about setting up infrastructure using Netlify Functions and PlanetScale MySQL.

Then level up and take advantage of hyperscalers with AWS CDK, Lambda, and DynamoDB using your first AWS account.

Learn how to use async/await for the first time and optionally delve into advanced concepts like Streams.

Use Rust to insert and query data from both SQL and NoSQL databases.

Terminals and shells

The CLI Path

Rust excels at creating small, portable, and quick to run Command Line applications.

Parse flags from the CLI, config files, and the environment with Clap.

Learn how to integration test CLI tools by taking control over binaries, asserting against the filesystem, and even working with interactive programs.

Provide useful human feedback for errors and progress.

Experience the tracing crate for the first time, a recurring theme that builds into observability later.

#[derive(StructOpt, Debug)]
#[structopt(name = "garden")]
struct Opt {
    #[structopt(
        parse(from_os_str),
        short = p,
        long,
        env
    )]
    garden_path: Option<PathBuf>,

    #[structopt(subcommand)]
    cmd: Command,
}
#[derive(StructOpt, Debug)]
enum Command {
    /// write something in your garden
    ///
    /// This command will open your $EDITOR, wait for you
    /// to write something, and then save the file to your
    /// garden
    Write {
        /// Optionally set a title for what you are going to write about
        #[structopt(short, long)]
        title: Option<String>,
    },
}
fn game_reset(
    mut commands: Commands,
    tiles: Query<Entity, With<Position>>,
    mut game: ResMut<Game>,
) {
    for entity in tiles.iter() {
        commands.entity(entity).despawn_recursive();
    }
    game.score = 0;
}

Flashing Lights

The Games Path

Let's face it, the only thing that matters when learning something new is that you’re still interested in it tomorrow. Building video games is a great way to level up your Rust knowledge while also being easy to show your friends and future employers.

Bevy's ECS based game engine allows us to build complex applications out of small building blocks. This means we can tackle more advanced concepts like implementing Traits in isolated pieces of our application.

Learn how to build your own structs take advantage of traits to imbue them with the functionality you need.

Games provide us with a rich tapestry of problems that we can use to advance our Rust skills such as:

  • Generating randomness
  • Iterating over collections
  • Applying user input
  • Keeping score and time
  • Combining multiple optional data sources

I designed Rust Adventure to allow you to learn Rust through practical, fun projects.

Learning features of the Rust language in-context when we need to solve real problems helps them stick because you'll actually understand why lifetimes exist.

During Rust Adventure, you will build up a collection of real-world code you can show your friends *and* your future employers.

Chris Biscardi

Instructor

Ready to dive in?Start your Rust Adventure today.

Jump in, we're going to learn Rust!

Get a head start with my free 5-Part email course.

No spam, and you are free to unsubscribe at any time.