portside-labs/laravel-rust
About
An unofficial port of the Laravel framework to Rust. Routing, Eloquent, Blade, Artisan, queues and the rest of Laravel 13, built on Tokio.
Web & App DevelopmentMeasured star growth
- in 24h
- Collecting history
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalAbout Laravel
Note: This repository contains the core code of the Laravel framework, ported to Rust. It's an unofficial port, not affiliated with Laravel. If you want to build an application using Laravel Rust, install the
laravel-rustinstaller and create one from the application skeleton:curl -fsSL https://portsidelabs.io/laravel-rust/install.sh | sh laravel-rust new example-app
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as:
- Simple, fast routing engine.
- Powerful dependency injection container.
- Multiple back-ends for session and cache storage.
- Database agnostic schema migrations.
- Robust background job processing.
- Real-time event broadcasting.
Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb combination of simplicity, elegance, and innovation gives you a complete toolset required to build any application with which you are tasked.
This port brings that toolset to Rust: Eloquent, Blade, validation, queues, Artisan, and testing that reads like a story, with your application compiled to a single fast binary.
use laravel::prelude::*;
pub fn web() {
Route::get("/", || async { view("welcome", ()) });
Route::get("/users/{user}", |user: User| async move { Json(user) });
Route::post("/podcasts", |request: Request| async move {
let validated = request
.validate(rules! {
"title" => "required|string|max:255",
"url" => "required|url|unique:podcasts,url",
})
.await?;
let podcast = Podcast::create(validated).await?;
ProcessPodcast { id: podcast.id }.dispatch().await?;
Ok::<_, Error>(redirect("/podcasts").with("status", "Podcast queued!"))
})
.middleware("auth");
}
Learning Laravel
Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework. Nearly all of it applies here: method names are the same in snake case (whereIn is where_in, firstOrFail is first_or_fail), facades are still facades, and helpers are still helpers. The guide to Laravel Rust tours the differences, and ARCHITECTURE.md explains how the framework is put together.
If you're not in the mood to read, Laracasts contains thousands of video tutorials covering a range of topics including Laravel, modern PHP, unit testing, JavaScript, and more. Boost the skill level of yourself and your entire team by digging into our comprehensive video library.
You can also watch bite-sized lessons with real-world projects on Laravel Learn, where you will be guided through building a Laravel application from scratch.
Contributing
Thank you for considering contributing to Laravel Rust! The contribution guide can be found in CONTRIBUTING.md.
Code of Conduct
In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
License
The Laravel framework is open-sourced software licensed under the MIT license.
Explore related projects
Loading…