what

Step 1: Install What

With Cargo

With Rust 1.89 or newer installed (rustup update brings an older toolchain up to date), run:

cargo install run-what --version 2.1.0 --locked

This downloads, compiles, and installs the run-what command globally. --locked uses the exact dependency versions the release was tested with.

Check the installation:

run-what --version

Expected output: run-what 2.1.0

Installed, but seeing command not found?

If Cargo printed Installed package, your installation succeeded. On macOS or Linux, run these two lines in the same terminal:

export PATH="${CARGO_HOME:-$HOME/.cargo}/bin:$PATH"
run-what --version

If Cargo's warning names a different folder, use that folder in the export command. To keep the fix for future terminals, add the same export line to your shell's startup file.

No Rust yet?

Installing it first takes one command on macOS / Linux:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

On Windows, use the installer from rustup.rs.

This page describes the 2.1.0 release. If run-what --version shows a different version, another installation comes first on your PATH. On macOS/Linux use command -v run-what (and type -a run-what for duplicates); on Windows PowerShell use Get-Command run-what -All. If an older executable wins, reopen the terminal or correct PATH to the installation you intend to use.

Step 2: Create Your First Project

Create a new project

run-what new my-site
cd my-site

This creates the minimal starter without asking any questions. It never overwrites files: if my-site already exists, choose another name. The first lesson of the course starts from this project.

Start development server

run-what dev

Open http://127.0.0.1:8085 in your browser. Live reload is enabled -- changes auto-refresh.

Build for production

run-what build --output dist

Pre-renders fixed public routes and minifies the output. Dynamic routes and server actions require separate handling; a static build is not a complete CMS deployment.

Project Structure

my-site/
  what.toml
  site/
    index.html
    application.what
  components/
    layout.html
  static/
    styles.css
    app.js
  data/               # Initially empty; runtime data appears here

The starter includes a shared layout. Framework CSS and browser runtime assets are supplied automatically when serving or building.

Source Code

The What framework is free to use under the MIT license. It is distributed as the run-what and what-core crates on crates.io, and each release's source code ships inside those crates.

Stuck on a step? Read the Getting Started guide, follow the tutorial roadmap, or browse the docs.