# The Laravel You Know, Written in Rust

> Source: [Laravel](https://www.youtube.com/watch?v=9znOFW6Bvg4) · Summary: https://yt-assist.com/v/9znOFW6Bvg4/the-laravel-you-know-written-in-rust

## Main topics
- **A New Framework for Rust**: Laravel for Rust brings Laravel’s focus on expressive, approachable development to Rust, while taking advantage of the language’s speed, safety, and compiler checks. The speaker says it was designed from first principles, not translated or automatically ported from Laravel PHP. [0:31](https://youtu.be/9znOFW6Bvg4?t=31)
- **Familiar Application Structure**: The framework includes routes, middleware, handlers, forms, models, relationships, events, and queued jobs. Its APIs are designed to feel familiar to Laravel PHP developers while fitting Rust’s conventions. [1:35](https://youtu.be/9znOFW6Bvg4?t=95)
- **Typed Forms and Models**: Form structs define valid request input and support validation, while typed model properties make application data explicit. This helps prevent invalid states and mass-assignment problems. [2:35](https://youtu.be/9znOFW6Bvg4?t=155)
- **Building and Testing a Campaign Workflow**: A demo newsletter application creates campaigns, dispatches events and jobs, and updates its dashboard. Tests can fake queues and users, make requests, and assert job and database results. [5:11](https://youtu.be/9znOFW6Bvg4?t=311)
- **Async Features and Framework Services**: Laravel for Rust supports asynchronous database and mail operations, background tasks, concurrency, an HTTP client, caching, notifications, signed URLs, and file storage. It also includes Inertia support and email templates. [11:24](https://youtu.be/9znOFW6Bvg4?t=684)

## Key takeaways
- **Speed and Safety**: Rust’s performance and compiler checks can help applications serve more requests efficiently and catch mistakes before they ship. The speaker says Laravel for Rust can be more than ten times faster than Laravel PHP in many cases. [0:31](https://youtu.be/9znOFW6Bvg4?t=31)
- **Familiarity with Rust-Specific Benefits**: The framework keeps recognizable Laravel concepts and syntax while leaving behind features that do not fit Rust and taking advantage of its type system and async capabilities. [7:45](https://youtu.be/9znOFW6Bvg4?t=465)
- **Support for AI Agents**: The project includes skills intended to help agents build Laravel for Rust applications with appropriate structure and output. [10:53](https://youtu.be/9znOFW6Bvg4?t=653)

## Lessons learned
- **Make Invalid States Harder to Represent**: Typed forms and models, along with validated input, bring correctness into the framework instead of relying on developers to manage safeguards manually. [3:07](https://youtu.be/9znOFW6Bvg4?t=187)
- **Co-locate Related Code**: Models and factories can live together, making their relationship easier to see and helping keep them in sync. [6:43](https://youtu.be/9znOFW6Bvg4?t=403)
- **Use Async Work Where It Fits**: The framework can run background tasks and concurrent operations without blocking a request while waiting for slower work. [11:24](https://youtu.be/9znOFW6Bvg4?t=684)

## Conclusion/next steps
- **Try the Beta**: The first beta is available to try. The speaker invites developers to clone the project, start an application, use an agent to build with it, and deploy to Laravel Cloud. [15:34](https://youtu.be/9znOFW6Bvg4?t=934)

---
Summary by yt-assist.com. Web page: https://yt-assist.com/v/9znOFW6Bvg4/the-laravel-you-know-written-in-rust
