Laravel Go vs. Laravel Rust: An Engineering Guide for PHP Teams

A hands-on comparison of Laravel Go, Laravel Rust, and PHP, with route examples, benchmark analysis, and a production migration plan.
Laravel Rust entered beta on December 1, 2026. Laravel Go followed on December 2. Both extend Laravel conventions for routing, validation, database models, queues, and workflows to a new language. The first adoption decision is where to draw the service boundary. Moving one slow endpoint and rewriting an application with years of PHP packages are very different engineering projects.
What the runtimes change
Laravel Go builds on the standard net/http stack. The app implements http.Handler, so existing compatible Go handlers and middleware fit directly. Each request runs in a goroutine. Pass context.Context through database and HTTP calls so work can stop when a deadline expires or the client disconnects. Wire shared dependencies at startup. Under load, inspect allocations, garbage collection, and the connection pool before adding more goroutines.
Laravel Rust uses Axum and Tokio. A handler can accept typed extractors, including a model bound to a route parameter. Typed inputs and model declarations move some checks into compilation. Ownership manages memory without a tracing garbage collector, while Tokio multiplexes async work. Running blocking disk calls or CPU-heavy transformations on executor threads can delay unrelated requests. Use a bounded worker pool for that work.
Laravel PHP is the baseline. FrankenPHP can serve Laravel PHP while application code still runs in PHP. The cost of moving encompasses Composer packages, sessions, permissions, scheduled tasks, and serialized job payloads. If profiling shows a slow aggregate query or repeated network calls, fix those and measure the PHP baseline again before considering a service.
Build a small route in Go and Rust
Install the current Laravel CLI from the official documentation. Generate two applications and run one at a time to avoid a port conflict.
laravel new runtime-go --go
laravel new runtime-rust --rust
# In either project directory:
laravel dev
In Go, add the following inside the generated Web function.
// Inside Web in routes/web.go. Import go.laravel.com/web.
route.Get("/runtime-check", func(_ *web.Request) *web.Response {
return web.Text("runtime-ready")
})
In Rust, add the following inside the generated routes function.
// Inside routes in src/routes/web.rs.
route.get("/runtime-check", async || "runtime-ready");
If your local port differs, change the URL. Both examples should respond with the same body.
curl -fsS http://localhost:8000/runtime-check
These routes exercise routing and response handling. They do not query a database. A production readiness probe should decide what dependencies are essential and cap the time it spends checking them.
Read the benchmark before choosing a language
| Stack | Successful requests/sec | p95 | p99 | Reported memory |
|---|---|---|---|---|
| Laravel Rust | 1,774 | 112 ms | 137 ms | 179 MB |
| Laravel PHP + Octane + FrankenPHP | 97 | 2,634 ms | 2,707 ms | 481 MB |
Laravel tested two read-only MySQL endpoints: a paginated feed and a single-record lookup. The dataset had 200 posts and 10 authors. The team used equal 4 GiB application instances and selected each stack's best 10-second window with no recorded HTTP failures. The PHP baseline already ran Octane with FrankenPHP. Laravel Go was absent. Beego represented Go in the original comparison. The result measures that workload on that setup. It cannot predict write throughput, a cold start under your deployment policy, or end-to-end latency when an upstream API dominates.
Pilot a PostgreSQL reporting endpoint
Begin with an authenticated, read-only summary of assessment attempts. For an illustrative PostgreSQL schema, the data access layer might run a parameterized aggregate like this:
SELECT status, count(*) AS attempts
FROM assessment_attempts
WHERE school_id = $1
AND assessment_id = $2
GROUP BY status;
Resolve the school from the already-authorized request context. Bind both parameters. Keep the PHP application as the owner of exam submission, grading, and schema changes during the pilot. Match response fields, count semantics, empty results, and rules for cross-school access. Compare responses on fixed fixtures before comparing performance.
- Profile the PHP baseline. Record the query plan, connection pool wait, p95/p99 latency, and application CPU and memory. Validate indexes against representative data and tenant sizes.
- Make the comparison fair. Use the same connection budgets, data, SQL, authorization behavior, payload, target request rate, and error budget. Test warm traffic and a sudden spike separately.
- Roll out gradually. Compare sampled read results first, then route a small cohort through the new service. Revert routing if correctness, p99, or the error budget deteriorates.
- Measure operations as well. Record clean and cached build times, rollback time, and the effort needed to patch dependencies and debug a failing deployment.
Queues and deployment are part of the decision
Keep PHP job payloads on their current workers. If a new service needs to consume the same business event, publish a versioned JSON contract with a stable event ID. Assume a job can be delivered again after a worker crashes. Make effects idempotent, set a retry limit, and verify what happens when the database or broker is temporarily unavailable. Both new frameworks offer durable workflows, which can resume work. External systems still need an idempotency key or an equivalent duplicate guard.
Try Go first for an I/O-heavy endpoint when the team already owns Go services and values reuse of standard HTTP components. Evaluate Rust for a measured CPU or memory constraint when the team can sustain Cargo builds and ownership design. Keep PHP when the profile points to the database or a dependency, or when the measured production gain does not pay for a second runtime.
Sources
Featured Articles

PHP 8.6 Explained: New Features, Breaking Changes, and a Production Upgrade Guide
Explore PHP 8.6 with practical examples for partial application, Duration, polling, and readonly defaults. Then audit breaking changes and plan a Laravel rollout.

Liquid AI LFM3 Explained: Small Multimodal Models for Local AI Agents
A practical guide to Liquid AI’s LFM3 family: text, vision, audio, Omni, and decision models, with verified specifications, realistic memory requirements, local deployment examples, and application design advice.

Specialized AI Models in 2026: A Practical Guide to Speech, OCR, Vision, and Forecasting
Explore 22 specialized AI models and tools for speech recognition, typed decisions, voice generation, document parsing, embeddings, computer vision, tabular prediction, and time-series forecasting—with practical architecture, evaluation, and deployment guidance.
Comments
0 commentsNo approved comments are visible yet. New community replies may wait for moderation.