20 / 35

Meet Laravel Rust· 9 min read· Lesson 20 of 35

What is Laravel Rust?

Part 2 · Laravel Rust. Meet Laravel Rust: a batteries-included web framework that brings Laravel's friendly conventions to fast, async, compile-checked Rust.

You’ve learned the Rust you need. Now you’ll use it to build something people can open in a browser: the ordering website for Rusty Bean Café. This lesson has no setup and no commands. It explains what a web framework is, where Laravel came from, and what Laravel Rust gives you.

What is a web framework?

Every time you open a web page, two programs talk to each other:

  1. Your browser sends a request, a short message such as “please give me the page at /menu”.
  2. A program on a server (a computer somewhere on the internet) reads that request and sends back a response, such as the HTML for the menu page.

That’s the whole web: requests in, responses out, millions of times a day.

You could write the server program by hand, but you’d have to handle network bytes, forms, cookies, logins, databases, emails and security yourself, and stay fast when 500 people order coffee at once. That’s a lot of plumbing before a single line about coffee.

A web framework is a ready-made kitchen for that work. Think of opening a café: you could build your own espresso machine, plumbing and cash register, or you could move into a fitted-out café and start making coffee on day one. The framework is the fitted-out café, and you bring the recipes.

Note

You’ll see the word HTTP a lot. It’s the language browsers and servers use for requests and responses. A request has a method (like GET for “show me” or POST for “here’s a form I filled in”) and a URI, the path part of a web address, such as /menu.

Laravel: a framework with a philosophy

Laravel started as a framework for PHP, another programming language, and became one of the world’s most popular web frameworks. Its ideas are easy to state:

  • Batteries included. Routing, logins, databases, emails, background jobs and testing all come in the box. You don’t need to hunt for and glue together dozens of libraries.
  • Conventions over decisions. Every Laravel app keeps routes, models and handlers in the same places. Anyone who knows Laravel, including a coding assistant, can open your project and find their way around.
  • Readable code. Laravel code reads almost like English.

You don’t need any PHP for this course. We’ll explain every Laravel idea from scratch.

So what is Laravel Rust?

On December 1, 2026, the Laravel team released the first beta of Laravel Rust. In their words, it is “not a blind port of Laravel to Rust”, but “Laravel reimagined in idiomatic Rust.” It keeps Laravel’s philosophy and conventions, rebuilt on Rust’s speed and safety.

The beta already includes most of the pieces a real website needs. Here are the ones you’ll meet in this course, and what each would do at Rusty Bean Café:

Feature What it means At the café
Routing Matching a URL to the code that handles it /menu shows the menu
Middleware Checks that run before or after a request Only staff can open /admin
Sessions Remembering a visitor between page loads Keeping a customer’s basket
Authentication Logging users in and out Staff accounts
Models Rust structs that read and write database tables MenuItem, Order
Queues Running slow work in the background Sending receipts without making the customer wait
Workflows Long, multi-step processes that survive restarts “Order placed → ready → picked up”
Mail Sending emails Receipt emails
Broadcasting Pushing live updates to browsers “Your latte is ready!”
Inertia Building pages with React, Vue or Svelte A modern order form

Laravel says the beta is “near feature parity to Laravel PHP”: almost everything is already there.

Important

Laravel Rust is in beta. The official docs warn that “releases before 1.0 may include breaking changes to APIs and configuration.” If something in this course doesn’t match your installed version, trust the official Laravel Rust documentation (opens in new tab).

MVC in one minute

Laravel apps are organized around an old, proven idea called MVC, short for Model, View, Controller. Here’s what each part does in Laravel Rust:

  • Model: a Rust struct that stands for one database table. A MenuItem model reads and writes the menu_items table.
  • View: what the visitor sees, either an HTML template or an Inertia page built in React.
  • Controller: the code that sits between the two. Laravel Rust calls these handlers: async functions that take a request and return a response.

A route connects a URL to a handler: visiting /menu runs the handler that returns the menu page.

Built on Axum and Tokio

Laravel Rust is built on two Rust libraries:

  • Tokio, the async runtime you met in Async/await and Tokio. It lets a small number of threads juggle thousands of tasks.
  • Axum, a popular Rust web library built on Tokio, which does the low-level HTTP work.

Because everything is async, a request waiting on something slow, like a database query, doesn’t block anyone else. It’s like a barista who starts the next drink while the milk steams instead of watching the jug.

The compiler as your safety net

The biggest difference from PHP Laravel is Rust’s compiler. Laravel’s announcement says database column names, relationships, validated form inputs, authorization checks and secret values “are verified at compile time before your code reaches production.”

Here is a taste of a route file, adapted from the announcement for our café:

src/routes/web.rs
use laravel::prelude::*;
use crate::http::handlers::menu;
pub fn routes(route: &mut Router) {
route.get("/hello", async || "Welcome to Rusty Bean Café!");
route.get("/menu", menu::index);
route.get("/menu/{menu_item}", menu::show);
}

You don’t need to understand every line yet. Line by line:

  1. use laravel::prelude::*; is a glob import that brings in Laravel’s prelude of everyday types (see Modules and crates).
  2. pub fn routes(route: &mut Router) is an ordinary function. Laravel calls it at startup with a Router to fill in.
  3. route.get("/hello", async || ...) means “for GET /hello, run this async closure and send back its text.” (An async closure is a closure that can .await, see Async/await and Tokio.)
  4. The last two lines point URLs at handler functions in a menu module.

Misspell menu::index as menu::indx and the app won’t compile, so you catch it before a customer does.

Tip

Compiling Rust is slower than starting a PHP script. In return, a whole class of “oops, typo” bugs never reaches your customers.

Speed: the 18x claim

According to Laravel’s own internal benchmarks on Laravel Cloud, Laravel Rust runs 18x faster than Laravel PHP while using significantly less CPU and memory (source: Laravel’s announcement (opens in new tab)). That’s Laravel’s claim about their own tests, and your app’s numbers will depend on what it does. Still, it shows the goal: faster pages on fewer servers, even during the morning rush.

Built for the AI age

Laravel describes Laravel Rust as “built to thrive in the AI age.” More and more code is written with help from AI coding assistants (often called agents), and strict compilers and firm conventions keep them on track. So every new app comes with instructions written for agents:

  • AGENTS.md, a summary of how the app is laid out and tested (CLAUDE.md points to it).
  • .agents/skills/, a folder of focused agent skills, small guides on topics like models, validation, queues and testing.

Even if you never use an AI assistant, they make a handy cheat sheet.

Where this course goes next

Here’s how the rest of the course maps to the features above:

Try it yourself

  1. Rusty Bean Café wants three things from its website: (a) email a receipt after each order, (b) show “Your order is ready!” without the customer refreshing the page, and (c) let only staff see today’s sales. Which Laravel Rust feature from the table fits each one?
  2. In your own words, explain what a handler is to a friend who has never programmed.
Show solution
  1. (a) Mail, usually sent from a queue so the customer doesn’t wait. (b) Broadcasting, which pushes live updates to the browser. (c) Authentication to know who’s logged in, plus middleware to block everyone else from the sales page.
  2. Something like: “A handler is the worker behind the counter. The route tells each request which counter to go to, and the handler takes the order and hands back the result, such as a web page.”

Recap

  • A web framework handles the plumbing of requests and responses so you can focus on your app.
  • Laravel is known for batteries-included features, strong conventions and readable code. Laravel Rust rebuilds it in idiomatic Rust (beta since December 1, 2026).
  • Routes point URLs at handlers, handlers use models and return views or other responses: that’s MVC.
  • It’s built on Axum and Tokio, so it’s async from top to bottom, and the compiler checks many mistakes before you deploy.
  • Laravel reports an 18x speedup over Laravel PHP in its own benchmarks, and every new app ships with agent skills for AI assistants.

What’s next

Time to get your hands dirty. In Creating your first app you’ll install the Laravel CLI and get the Rusty Bean Café site running on your own computer.

0 of 35 lessons complete

Search lessons

Type to search all lessons.