slurp CLI is required. Everything else on this page is optional. The
Choosing components table lists what each piece covers.
The compiler
slurp-compiler and the binary it installs is slurp. That one
binary does everything: build, validate, dev and gitignore.
Requires a Rust toolchain, 1.88 or newer. Slurp is on edition 2024, and
its dependency tree pushes the floor from 1.85 up to 1.88. An older toolchain
fails with
feature "edition2024" is required rather than a version message,
so run rustup update stable if you see that.Verify it
validate exits 0 on success and 1 if anything failed, so it is safe to put in
a script or a pre-commit hook.
Choosing components
The dev server
slurp-dev-server and the binary is slurp-dev. It watches a
theme, rebuilds on change and pushes a reload over a WebSocket.
slurp dev is a launcher, not a second implementation: it looks for a
slurp-dev binary next to the slurp binary, falls back to PATH, and
forwards only --port and --fixtures. Without slurp-dev-server installed,
slurp dev has nothing to launch. Invoke slurp-dev directly for the flags the
launcher does not forward, such as --theme-dir, --globals or
--backend-url.
See Dev server.
The image service
<Image> component, which emits URLs pointing at
it. A plain <img> tag involves no service.
It binds loopback and sends no CORS headers by default, because it fetches URLs
an attacker may influence. See Images for running it and for
what it refuses.
The browser runtime
slurp build produces plain HTML and injects no script tag, so a page that does
not need client navigation or {fetch} refetching ships no JavaScript from
Slurp. A theme that wants the runtime loads it explicitly:
The MCP server
@bytesell/slurp-compiler-wasm,
so it needs no slurp binary on PATH. Requires Node 20 or newer.
Most clients can fetch it on demand rather than installing it:
Editor tooling
Prettier
.slurp files. Prettier 3 is a peer dependency.
.prettierrc
VS Code
The extension gives syntax highlighting, completions, hover docs, go to definition and formatting. Build and install the.vsix from a clone:
Embedding the compiler
To render templates from your own program rather than from the CLI:Building from a clone
target/release/ as slurp, slurp-dev and
slurp-image. slurp dev prefers a slurp-dev sitting beside it, so a
workspace build yields a working slurp dev with nothing installed.
The JavaScript packages are a separate build, and they need Node 22 or newer,
pnpm 9 or newer, and wasm-pack:
pnpm build is what produces @bytesell/slurp-compiler-wasm, which the MCP
server and the compiler integration tests both import, so run it before
pnpm test on a fresh clone. CONTRIBUTING.md has the full gate list.
Next
Quickstart
Build and render a real page in about five minutes.
Project structure
Special directories, output paths, and static assets.
CLI
Every subcommand and flag.
Images
The
<Image> component and the image service.