Wisp is in pre-release, self-hosted since GitHub suspended us. Install it, or see the changelog.

Wisp

Wisp 1.0

Wisp 1.0 is near. A fast, fun web framework for Rust with file routes, templates compiled to Rust, form actions and one binary. What it is, what we measured and where it loses.

· The Wisp Team · 5 min read

Wisp 1.0 is close. The latest build is a 1.0 pre-release. Wisp is a fast, fun web framework for Rust. A folder is a URL, its +page.wisp is the page, and the whole app builds to one binary.

This post says what Wisp is, where it runs, what we measured and where it does not win.

Watch the showcase first. The video loads from YouTube only after you press play.

What Wisp Is

  • File routes. A folder under src/routes is a URL.
  • .wisp templates compiled to Rust. Markup becomes plain Rust at build time. A request runs compiled code, with nothing to parse.
  • Form actions. #[model] and #[validate] check the input. <form fields> writes the inputs and the error messages. A bad value is a 422 that keeps what the user typed. The form works with JavaScript off.
  • One binary. The app, styles and static files build to one file.

A todo list, in one file:

---
#[model]
struct Todo {
    #[validate(len = 1..=100)]
    text: String,
}

static TODOS: Table<Todo> = Table::saved(); // "todos"

#[action]
fn add(todo: Todo) {
    TODOS.add(todo)?;
}
---

<title>Your todo list (${TODOS.len()})</title>
<meta name="description" content="Add todos with a form; each one is kept in a saved table.">
<h1>Todos</h1>
<form action="?/add" fields><button>Add</button></form>
{#each TODOS.all() as todo}
  <p>${todo.text}</p>
{/each}

Get Started

You need Rust 1.89 or later.

Wisp is a pre-release. It installs from code.wispweb.dev until 1.0 is on crates.io.

cargo install --git https://wisp.ar0.eu/ --tag v1.0.0-pre.3 wisp-web
wisp new guestbook --template minimal
cd guestbook
wisp dev

Open http://127.0.0.1:3000. The Quick Start covers the rest in one page. The Tutorial builds a small app from an empty folder.

Four Rules, in Order

When two goals pull apart, Wisp chooses in this order. Each rule has measured proof: the Benchmarks page for rules 1 and 3, the Tokens page for rule 2.

  1. Fast. A route pays only for the features it uses. A change to the request path is checked by an instructions-per-request A/B before it lands.
  2. Cheap in tokens. AI writes much of the code now, and every token costs time and money.
  3. Durable. Each fast path is proven when the server starts. If the proof fails, Wisp uses the plain path. A panic in a handler is answered as a 500.
  4. Flexible. Last, and never at the cost of the first three.

Speed

The Benchmarks page has every speed number of this release, with its machine and method. Compare numbers only from the same row of the same table.

Native, Linux. Wisp has ranked wins over Actix Web on plaintext at 256, 1,024 and 4,096 connections and on JSON at 16 and 128 connections. In the other five cells (JSON at 32, 64, 256 and 512, plaintext at 16,384) the load generator was at its limit, so the Wisp number is a lower bound ("at least") with no rank and no win. See Native, Linux. This is not an official TechEmpower result.

Instructions per request. On the server thread, Wisp uses fewer instructions per request than Leptos, Dioxus and Actix Web. See Instructions per Request.

JavaScript hosts. The same app runs on Node, Bun, Deno and Cloudflare. The ranked runs compare Wisp with Hono. See Node, Bun and Deno and workerd.

Where Wisp Does Not Win

We list these on the benchmark pages, and we list them here too.

  • Build time. Wisp is not first on a cold build. A cold release build of the benchmark app takes 43.9 s. SvelteKit takes 3.7 s, Nuxt 5.1 s and Axum 28.6 s. Wisp compiles Rust with fat LTO. After an edit, a release build takes 14.9 s for a logic edit and 15.0 s for a template edit. Wisp is the fastest when nothing changed (38 ms). A string literal edit shows in 1 ms in the dev server. A template edit shows in 48 ms there, against 14 ms for SvelteKit. See Build Time and Dev Reload.
  • Native memory and /list. Wisp uses 5 MB after load, Actix Web 3 and Axum 4. On /list Wisp has 54,292 requests a second, Actix Web 55,863 and Axum 57,053. See Twelve Frameworks, Native, Linux.
  • Node /params on node:http. Wisp has 114,496 requests a second, Fastify 127,917 (10.5% behind).
  • Deno /. Wisp has 277,905 on raw sockets and 298,471 on Deno.serve, Hono 355,860 (22% and 16% behind).
  • workerd memory. Wisp uses 369 MB after load, Hono 335.
  • Cold start on Bun, Deno and workerd. Hono and itty may start faster. See Node, Bun and Deno and workerd.
  • Not for every team. Wisp is Rust only, and it has fewer ready-made UI pieces than NPM. Why Wisp, and When Not says when Axum, Leptos, Dioxus, SvelteKit or Next.js is the better choice.

Cheap in Tokens

We count the tokens of the same five features in each stack. For a bigger app (sign up and in, a posts table, an upload, live refresh and a component), Wisp needs 1,014 tokens. That is 3.6 times less than SvelteKit and 3.4 times less than Next.js. Wisp ships the form rules and the form markup, which the other apps write by hand, and the Tokens page says how that favors Wisp. In the JSON endpoint row, Nuxt and Axum are shorter than Wisp, and the page shows that too.

For agents, llms/AGENTS.md and its topic files in llms/wisp-ref/ are the whole reference, and wisp mcp serves the docs over MCP.

Host It Anywhere

wisp build writes the binary for a VPS or a container. On Linux it uses io_uring, with epoll as the fallback. wisp build --static writes static HTML. --target builds for Cloudflare Workers and Pages, Deno Deploy, Vercel, Netlify, Node, Bun and AWS Lambda. See Deploying.

Editor support covers VS Code, Neovim, Helix, Zed, Sublime, JetBrains and Emacs, with wisp lsp for hover, completion and checks. See Editors.

Recent Work

  • Client navigation that survives bad networks. A fast answer morphs in with no flash. A slow one shows a progress bar. Back and Forward show the last page at once, then refresh it. A newer click cancels the older request. After a deploy, a tab left open loads the new page whole. Cloudflare's email address obfuscation still decodes after a soft navigation. See Router.
  • Streaming and partial prerendering. An {#await} that does not read the request stays in the prerendered page, and the rest streams. See Pages.
  • 103 Early Hints. A page that waits for data sends the preload links first. Pages that never wait pay nothing. See Serve.
  • Base path. base = "/app" serves the app under a path. See Config.
  • Memory goes back when idle. A worker with no open connection for 2 s frees its spare buffers, and the heap is handed back to the system. See Design.

What Comes Next

Wisp is young. The team audits every file internally. No third party has audited Wisp, and it has no long production record yet. Read Security before you trust it with user data. The code is at code.wispweb.dev/wispdev/wisp. Issues and pull requests are welcome, and Community says where to ask.

Thank you for trying Wisp.

Type to search every docs page and heading.