We've brought our packages to Rust
Laravel Rust has been released, and we've ported a selection of our Laravel and framework-agnostic PHP packages to Rust. If you want to give Laravel Rust a try, you can already use Media Library and Permission in your projects.
We've also added Rust and Laravel Rust support to Flare. Read our announcement: Laravel Rust support in Flare.
We've believed in Laravel since it was still a small PHP framework. We shared the packages we built for our own projects, and I'm glad we could help make Laravel more popular that way.
Our PHP packages have now been downloaded 3.5 billion times. I'd say the community appreciated the effort. I'm proud of what we've built together, and grateful to everyone who has used or contributed to our packages.
Laravel is a lot bigger now, but we still want to do our part. With Laravel Rust released, we decided to port some of our most popular packages so people trying the framework have a few familiar tools to work with.
We've also put our first Laravel Rust app in production: my blog, freek.dev now runs on Laravel Rust. Its code is open source on GitHub, so you can take a look at how we've built it.
A different way of building packages
We wrote our PHP packages by hand. Over the years, we spent a lot of time improving their APIs and making sure you could customize them for your own projects. Using the packages ourselves helped, as did all the feedback and contributions from other developers.
Now, a lot of code is being generated by AI. I suspect a large part of Laravel Rust was written that way too. Our Rust packages certainly were. We used AI to port both the Laravel packages and the framework-agnostic ones.
I still think PHP is a beautiful language, and I expect it to be around for a long time. We understand it deeply, and we know how to write and read it well. As AI gets better, I think readability will matter less for some applications, and the performance of languages like Rust or Go could become a bigger reason to choose them. Moving between languages becomes easier when we don't have to write every line ourselves. Understanding the concepts still matters, though. I'm looking forward to exploring Rust's concepts and patterns in more depth, beyond the syntax.
At Spatie, we'll keep supporting our PHP packages for a very long time. We have a good track record of maintaining them, and that won't change. We're making the same long-term commitment to our Rust packages, and we'll keep polishing and maintaining them.
We're not Rust experts yet, but these packages didn't come out of a vacuum. We gave the agent our PHP implementations, documentation, and package structures we'd spent years refining. It also had carefully designed public APIs and test suites covering the general logic and edge cases that matter just as much in Rust. We know these packages well, and we know how we want them to work.
I was happy to see how much of that work carried over. The Rust packages have familiar APIs, with places to plug in your own code when the defaults don't fit. We didn't have to figure all of that out again.
For this first pass, we mainly reviewed the public APIs and extension points. We spent less time on the code underneath. There's more work to do there, and we'd appreciate help from people with more Rust experience than us.
An early release
Like Laravel Rust, we've tagged our first releases 0.1.0. We've published 27 crates at that version. Some of the other ports are on GitHub but aren't published on crates.io yet, so check the installation instructions for the package you'd like to try.
These aren't stable releases yet. Our PHP packages have years of use behind them. These ports don't. I'd try them in a side project first, and expect the API and implementation to change as we learn more.
If you know Rust well, please take a look and tell us what we can improve. And if you've used the PHP packages, I'd love to hear how you get on with these versions.
Flare supports Rust too
We're adapting Flare as well. It can now accept errors from Rust and Laravel Rust applications, with stack traces and traces to help you work out what went wrong. The Rust client and Laravel integration are in beta. You can read more in our announcement: Laravel Rust support in Flare.

Laravel also announced exception tracking on Laravel Cloud. Having that built into your hosting sounds convenient, and given Laravel's track record, I expect it to be good.
I still see a reason to keep error tracking on a separate service, though. Who watches the watchers? If your hosting platform has an incident, you don't want that same incident to stop you from accessing the errors you're investigating.
A separate service won't catch failures your application can't report, but it can keep the reports you've already sent accessible while you work out what's wrong. For some projects, that independence is worth having.
Our Laravel Rust packages
Here's what we've ported so far, with links to the Rust docs.
- Media Library associates files with your application models. Store them on named disks, organize them into collections, and generate image conversions through application jobs.
- Permission manages roles and permissions in your database. You can assign permissions directly or through roles, with support for team scopes, middleware, and policies.
- Activitylog records application activities and model changes in your database. Attach extra properties to log entries and query them through models or the activity query builder.
- Analytics retrieves visitors, pageviews, and other reports from Google Analytics 4. It also supports custom queries and realtime reports.
- Backup creates ZIP archives of application files and database dumps. Store them on configured disks, clean up old backups, and monitor backup health.
- Feed generates Atom, RSS, and JSON feeds. Use your application models as feed items and customize the views used to render them.
- Health checks services such as your database, Redis, and queues, alongside your own custom checks. Store the results, display a dashboard, and send notifications when something fails.
- Honeypot adds a hidden field and an encrypted timing token to your forms. Middleware rejects suspicious submissions before they reach your handler.
- Mailcoach Mailer sends application mail through Mailcoach's transactional email API. It supports attachments, saved templates, and replacements through the ordinary mail API.
- Mailcoach SDK is an async client for the Mailcoach API. Manage lists, subscribers, campaigns, and transactional mail on hosted or self-hosted Mailcoach.
- Markdown renders Markdown with heading anchors and syntax-highlighted code. It supports front matter and custom extensions without needing a Node process.
- Missing Page Redirector redirects old URLs after your application returns a missing-page response. Load redirect rules from configuration or application data without interfering with pages that still exist.
- OG Image generates Open Graph images from HTML templates. Use local or remote Chrome, or Cloudflare Browser Run, and queue generation through your application.
- Package Tools helps you define a package in a single service provider. Register configuration, migrations, commands, views, and routes that applications can override.
- PDF creates PDFs from HTML and application views. Choose a rendering backend such as Chrome, Browsershot, Gotenberg, or WeasyPrint.
- Query Builder builds model queries from API request parameters. You choose which filters, sorts, and relationships people can request.
- Response Cache caches HTTP responses through middleware. Customize which responses are cached, separate entries per user, and control invalidation.
- Schedule Monitor records scheduled task runs and checks whether they finish on time. It can also send monitoring pings to Oh Dear.
- Site Search crawls your site's rendered HTML to build a searchable index. Store it in your database or Meilisearch and refresh it through application jobs.
- Sitemap generates XML sitemaps by crawling a site, adding URLs yourself, or combining both approaches. It supports images, videos, news articles, and language alternates.
- Suspicious Login assesses logins using device, IP, location, and recent login history. Use the risk score to warn a user, block a login, or run your own actions.
- Tags stores translated tags and attaches them to your models. It can generate localized slugs and filter model queries by tags and namespaces.
- Translatable stores model translations in ordinary JSON columns, without an extra translation table. Choose a locale per request, configure fallbacks, and query translated fields.
- Laravel Rust package template gives you a starting repository for your own Laravel Rust packages. Its configuration script replaces the placeholders with your package details.
Our framework-agnostic Rust packages
These packages don't require Laravel. You can use them in other Rust applications too.
- Browsershot uses Chrome to convert HTML or a web page to an image, PDF, or string.
- Calendar Links generates links for adding events to Google Calendar, Outlook, Yahoo, and other calendar systems.
- Crawler crawls websites with configurable concurrency, depth, and page limits. An async event stream gives your application the pages it finds and any failures.
- DB Dumper creates database dumps using the command-line tools for MySQL, MariaDB, PostgreSQL, SQLite, and MongoDB.
- Holidays calculates public holidays for a country.
- Image gives you a fluent API to resize, crop, watermark, and encode images.
- Image Optimizer runs images through a chain of command-line optimization tools. It supports PNG, JPG, WebP, AVIF, SVG, and GIF files.
- Lighthouse runs Google Lighthouse from Rust to audit a page's performance, accessibility, SEO, and more.
- Opening Hours describes a business' opening hours and exceptions. Check whether it's open on a particular day or date.
- PDF to Text extracts text from PDF files using an installed Poppler or Xpdf
pdftotextprogram. - Period compares date ranges and calculates overlaps, gaps, and differences between periods.
- Ray sends debug output from any Rust application to the Ray desktop app.
- Robots.txt helps determine whether a page may be crawled. It understands robots.txt rules, robots meta tags, and X-Robots-Tag headers.
- Schema.org builds Schema.org entities with a fluent API and renders them as JSON-LD.
- Simple Excel reads and writes Excel, CSV, and ODS files.
- Spreadsheet ODS is our maintained copy of Thomas Scharler's
spreadsheet-odscrate. It supplies Simple Excel's ODS writer, and most applications should use Simple Excel rather than this lower-level crate directly. - SSL Certificate reads X.509 certificate metadata from files, strings, or TLS servers. Check which domains a certificate covers and when it's valid.
- Temporary Directory creates temporary directories, gives you paths inside them, and deletes them when you're done.
- URL Signer creates signed URLs with an expiration date. URLs signed by the PHP package can be validated in Rust, and vice versa.
- Rust package skeleton is a template for your own framework-agnostic packages. Create a repository from it and run the configuration script to fill in your package details.
In closing
If you'd like to give the packages a try, you'll find the Rust documentation on our site.
I'm curious to see what people build with Laravel Rust, and I hope our packages can help. We welcome issues and pull requests on our Rust package repositories, whether you've found a bug or see a better way to write some of the code.
