Skip to content

Laravel for Rust in EnvKit: create an app on Windows or macOS without setting up a toolchain

Laravel for Rust (beta) in EnvKit 1.0.3: New project → Laravel (Rust) installs Rust, the build tools and the database, and works around the Windows CLI bug.

EnvKit6 min read
Laravel for Rust, one click in EnvKit, with the Laravel, Rust and EnvKit logos
On this page

On December 1 Laravel released the first beta of Laravel for Rust (Laravel calls it Laravel Rust): the Laravel way of building apps, written in Rust on Axum and Tokio, with Inertia, React and Vite on the front end. You create an app with the new Laravel CLI and laravel new <name> --rust.

That one command needs a fair amount underneath it: a Rust toolchain, a C compiler (some dependencies compile C code), Node.js, the CLI itself and a database. EnvKit 1.0.3 adds a project type that sets all of that up. This post walks through it on Windows and macOS, and explains one Windows bug in the CLI and what EnvKit does about it.

What you need

  • EnvKit 1.0.3 or newer. It's free and needs no account.
  • Windows 10 or 11 on x64, macOS on Apple Silicon, or Linux x86_64.
  • Disk space and some patience for the first build. It compiles the whole framework, which takes several minutes on a laptop. Later builds take seconds.

You don't need Rust, rustup, Visual Studio or the Laravel CLI installed beforehand.

Create the app

In EnvKit, open Sites → New project and pick Laravel (Rust). It carries a Beta badge.

The dialog asks for two things: a name and a database. SQLite is the default (a file in the project, nothing to install); PostgreSQL, MySQL and MariaDB are the other choices. Say you call it shop and pick PostgreSQL.

Then a checklist runs. Each line is a step, and EnvKit shows its output as it goes:

text
Build tools        MinGW-w64 on Windows, Apple's Command Line Tools on macOS
Rust 1.99+         EnvKit's Rust runtime, or your rustup if it fits
Node.js, Git, Laravel CLI 0.4.0
Database           PostgreSQL installed, started, database "shop" created
laravel new shop --rust
Cargo.toml         the database feature switched if you picked MySQL or SQLite
.env               APP_URL and DATABASE_URL for EnvKit's server and port
cargo build        the long one
migrate --force
laravel dev        https://shop.test

When it finishes, the dialog says the app is live and offers Open site, Open in editor and Terminal. The app runs through laravel dev (server, queue worker and Vite) as the site's process, on a free port, so two apps never fight over port 8000. EnvKit proxies https://shop.test to it with a trusted certificate.

If a step fails, the dialog names the step and rolls back what it made: the folder, the site and the database. Cancel stops the whole thing the same way.

On Windows: the build tools

This is the part that usually takes an afternoon. Rust's default Windows toolchain wants Microsoft's C++ build tools, which means installing Visual Studio components, with administrator rights and a few gigabytes of download.

EnvKit goes the other way. It uses Rust's windows-gnu target with its own MinGW-w64 build tools (GCC 16.2, from WinLibs), installed into EnvKit's data folder. That's about a 260 MB download, with no Visual Studio and no administrator prompt. The finished app doesn't depend on those tools: a release binary links only Windows system DLLs.

If you already have a working rustup MSVC toolchain and Visual Studio's C++ tools, EnvKit uses those and installs nothing.

The build tools also show up in Tools → Dev CLI → Build tools, with their size and license, if you want to install them ahead of time.

Windows on ARM isn't supported for now: the MinGW-w64 build is x86_64 only, and the step says so.

On macOS: Apple's Command Line Tools

On a Mac the compiler comes from Apple's Command Line Tools. EnvKit checks for them with xcode-select -p; if they're installed, the step passes straight away.

If they're missing, EnvKit opens Apple's installer (the same one xcode-select --install opens) and stops with a note to finish it and press Retry. Once Apple's installer is done, Retry carries on with Rust, the CLI and the rest of the checklist.

We tested the Windows flow end to end before release. The macOS flow runs the same steps; if anything goes wrong there, please open an issue.

The Windows CLI bug, and the workaround

Update, 2026-12-05: fixed upstream. Laravel CLI 0.3.1 (2 December) no longer has this bug, and EnvKit 1.0.4 and newer install CLI 0.4.0 and replace an older copy of their own. The wrapper below only matters if you run your own CLI 0.3.0 or older; laravel self-update fixes that too.

On Windows, Laravel CLI 0.3.0 builds the app fine and then stops with:

text
the application has no binary

The same error comes back from every app command that goes through the CLI, such as laravel migrate and laravel route:list. It's tracked upstream as laravel/cli-releases#1.

The cause is a path comparison. To find the binary it just built, the CLI runs cargo build --message-format json and looks for the artifact whose manifest_path matches its own Cargo.toml. It gets its own path from Rust's fs::canonicalize, which on Windows returns the long form \\?\D:\...\Cargo.toml. Cargo reports D:\...\Cargo.toml. The two never match, so the CLI decides there's no binary. On macOS and Linux, canonicalize returns the plain path and the bug doesn't show up.

Nothing you can do in the project fixes that, so EnvKit works around it in two places:

  1. Inside EnvKit, laravel new is allowed to end with that one error when the project is complete. App commands (Migrate, Route list on the site page) run as cargo run --quiet -- <command> in the app folder, which is what the CLI would run anyway.
  2. In your terminal, the laravel on EnvKit's PATH is a small wrapper. The CLI's own commands (new, dev, --version, self-update) go to the real CLI. App commands inside a Laravel for Rust app go to cargo run, from the app folder or any subfolder. Output, prompts, Ctrl+C and exit codes pass through.

So this works in a new terminal on Windows:

Terminal
cd shop
laravel migrate
laravel route:list

The wrapper only applies to CLI 0.3.0 and older. With 0.3.1 or newer, every command goes straight to the real CLI.

After the app exists

The site page has a Laravel (Rust) section with Migrate, Route list, Build release and the dev log. Build release runs npm run build and cargo build --release and shows where the binary ended up. Deploying that binary is up to you; EnvKit has no production mode for these sites.

EnvKit's Rust, the build tools and the Laravel CLI go on the PATH EnvKit manages, so a new terminal has cargo, gcc and laravel, ahead of Composer's older laravel installer.

Already have a Laravel for Rust app in a folder or a Git repo? Add it with Sites → Add existing or Clone from Git. EnvKit recognises it from Cargo.toml and opens the site page, where Prepare installs what's missing, builds it, creates the database on EnvKit's server and starts laravel dev. If .env already exists, EnvKit shows the change it suggests and only applies it when you tick it.

Limits of the beta

  • The framework has no SMTP mailer yet, so the app's mail goes to its log. Mailpit won't see it.
  • The first build is slow. That's the Rust compiler working through the framework, not EnvKit.
  • Windows on ARM isn't supported.
  • The laravel wrapper is written when you create or prepare an app. If your own ~/.laravel/bin comes before EnvKit's PATH entries, your real CLI wins and the Windows bug shows again.

The docs section is Laravel for Rust (beta), and there's a short overview on the Laravel for Rust page. For the framework itself, Laravel's docs are the place to start.

Get EnvKit

EnvKit is a free desktop app for Windows, macOS and Linux that runs your local web stack: web servers, PHP, databases, Node and now Laravel for Rust, each project at a trusted .test address. If you try the Laravel (Rust) flow, tell us how the first build went on your machine.

Try it on your own projects

EnvKit is free, with no account. nginx or Apache, several PHP versions, MySQL, PostgreSQL, Redis, Node and trusted .test HTTPS from one app.

Or install from the terminal
irm https://envkit.net/install.ps1?c=blog-laravel-for-rust-in-envkit | iex

More from the blog

All posts →