{
  "id": 23033492,
  "title": "Introducing Laravel Rust",
  "url": "https://urgent.news/2026/12/01/introducing-laravel-rust",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-12-01T23:33:38.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://laravel.com/blog/introducing-laravel-for-rust"
  },
  "original_language": null,
  "account": "Today, the initial beta version of Laravel Rust was released, merging Laravel's full-stack capabilities with Rust's unique features. This includes routing, middleware, sessions, authentication, database models, queues, mail, workflows, and testing aids. Laravel Rust isn't a simple translation of Laravel into Rust; it's a reimagining of Laravel in idiomatic Rust, tailored for a modern, high-performance stack, emphasizing developer experience in AI-driven applications. Every new application comes with pre-installed agent skills to guide coding agents on crafting and testing Laravel Rust code.\n\nLaravel Rust anticipates a future where humans will increasingly not write or manually read application code at scale. Hence, strong guardrails, strict compilers, and pre-loaded conventions are prioritized. It carries Laravel's battle-tested philosophies, conventions, and productivity into Rust, creating a high-performance full-stack framework designed to excel in the AI era, offering a robust foundation for developing ambitious, critical web applications.\n\nAt launch, Laravel Rust matches Laravel PHP on features, with any remaining discrepancies set to be resolved soon. The following sections detail some key features. Detailed documentation is available for comprehensive exploration, including authentication, encryption, file storage, task scheduling, console commands, and package development.\n\nIn benchmark tests using Laravel Cloud, Laravel Rust outperforms Laravel PHP by 18 times, consuming significantly less CPU and memory. This efficiency leads to reduced infrastructure costs, improved tail latency, and higher traffic capacity on a single server during traffic spikes.\n\nLaravel Rust is constructed using Axum and Tokio, ensuring asynchronous processing throughout the stack: HTTP handlers, middleware, database queries, HTTP client, Redis, queues, S3, SQS, and WebSockets are all non-blocking. Blocking tasks like bcrypt password hashing and local disk I/O are offloaded to Tokio's blocking thread pool. When a request waits for a slow database query, third-party webhook, or lengthy AI API call, these threads continue serving thousands of other requests, background tasks, and queue jobs without stalling.\n\nRust's type system enhances the framework significantly. Database column names, relationships, validated form inputs, authorization checks, and secret values are verified at compile time before deployment. At request time, Laravel maps the incoming request to registered routes defined in src/routes/web.rs and src/routes/api.rs. Handlers can be simple inline closures or complex modules under src/http/handlers. For example, a request to /users/42 will fetch user 42 and pass it to the route, or return a 404 if no corresponding user exists. URLs to routes can be generated using macros like route!(posts::show, &post) and redirect!(posts::show, &post), ensuring URL generation is compile-time checked and thus immutable.\n\nLaravel Rust supports defining incoming form and JSON payloads as Rust structs annotated with #[laravel::input] and field-level #[validate(...)] rules, creating fill structs from these definitions. Rigorous type checks ensure that column names, operators, and value types are validated, maintaining exact SQL syntax for conditions using &, |, and ! operators, bypassing nesting in where closures.\n\nDatabase relationships are explicitly defined in Rust structs annotated with #[model] and field-level attributes such as #[belongs_to] and #[has_many]. Models are designed to load all necessary data upfront with the with keyword, preventing N+1 queries by design. Database migrations are also Rust files in database/migrations/ that compile into the application binary, allowing server-side migration without shipping source files. Migrations run in transactions for PostgreSQL, SQLite, and automatically generate SQL for these databases. For complex queries or database-specific features, the db::query! macro enables direct SQL execution, capturing Rust variables, fields, and collections within braces, ensuring no string concatenation and preventing SQL injection by design.",
  "summary": null,
  "summary_source": "publisher",
  "key_points": [
    "Laravel Rust combines Laravel's full-stack capabilities with Rust's unique features.",
    "Outperforms Laravel PHP by 18 times in benchmark tests, using less CPU and memory.",
    "Database relationships are defined explicitly in Rust structs with compile-time validation."
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}