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

Wisp

Why Wisp, and When Not

Wisp is for server-rendered sites and apps in Rust. Numbers are in Benchmarks and Tokens.

What Each One Is

What it isYour code runs
WispFile routes, .wisp templates compiled to Rust, form actions, one binaryOn the server
AxumA routing library on hyper and tower; you choose the restOn the server
LeptosFull-stack Rust components with fine-grained reactivity and server functionsServer, and the browser as WebAssembly
DioxusWeb, desktop and mobile from one codebase, with rsx!Server, WebAssembly, desktop or phone
SvelteKit, Next.jsJavaScript full-stack frameworksNode or an edge runtime, plus the browser

How Wisp Differs

  • Your Rust runs only on the server. A page is HTML, and a form posts to an #[action] that works with JavaScript off (Without JavaScript).
  • A folder is a URL, and +page.wisp holds the logic and the markup. Axum has no file routes, and Leptos and Dioxus declare routes in Rust.
  • The browser gets HTML, not a WebAssembly bundle, unless you add your own script.
  • #[model], #[validate] and <form fields> write inputs and error messages.
  • The app, styles and static files are one binary, or a build for static hosting, a container, or an edge or serverless host (Hosting).

When to Pick Something Else

  • Axum: you want a library and your own choices, a service with no pages, or an existing tower stack. Wisp runs inside Axum through its tower feature (Embedding).
  • Leptos: you want Rust components in the browser, with fine-grained reactivity and server functions. It needs a WebAssembly bundle and cargo-leptos.
  • Dioxus: you want one codebase for web, desktop and mobile.
  • SvelteKit or Next.js: your team writes JavaScript or TypeScript, or you want the NPM component ecosystem. Wisp is Rust only.
  • NPM components do not work as Wisp components, since a .wisp component compiles to Rust. You can mount React, Vue, Svelte, Preact or web components as islands (Islands), bundle an NPM library and mount it from a use: action, import plain npm packages in browser code, use wisp ui add and wisp recipe add (Tooling), or share components as crates (Component Libraries). Expect to write more of your own UI.
  • A long track record: Wisp is new. Every file is audited line by line. See Security.

Numbers

Benchmarks compares Wisp with Axum, Actix Web and several JavaScript frameworks, with source file, date and machine. Tokens compares the same app in Wisp, SvelteKit and Next.js.

Instructions per request on the server thread (release 1.0.0-pre.3, Wisp 2362ec0d, callgrind, bench/rust-fastest/results/ir.txt): plaintext 14,341 for Leptos, 13,750 for Dioxus and 17,123 for Actix Web. Fortunes 165,437, 470,141 and 43,815. Wisp is not measured at pre.3, because the spread of its 3 reps was above 1% (details).

Is This Page Useful?

View This Page's Source

Type to search every docs page and heading.