Bun default
ServerOne binary with your app inside - weft build --compile.
Server and client live in the same file; weft splits them at build time and sends the browser only what it runs. No config file, no API layer to keep in sync, a 9.4 KB runtime.
bun create weft@latest
Try it here
No config file. Really.weft.config.ts is optional - most apps never write one.
Most of a web app is the code that moves data between a server and a browser. Weft writes that code for you.
A server() function runs on the server, everywhere else runs in the browser -
weft cuts the file in two and types the call between them.
const add = server(async (text: string) => db.todos.insert({ text }));
export default function Todos() {
return <form action={add}><input name="text" /></form>;
}
The whole client runtime is 9.4 KB compressed - smaller than most hero images.
Each interactive part ships and wakes up on its own, as its data arrives - the page never waits for the slowest.
The file tree is the router; links are checked by the compiler.
Sensible defaults for TypeScript, CSS, images and env vars. A config file when you need one - and only the line you change.
Save a file and the change is on screen before you look up - state kept.
38 ms
One build, many targets: Bun, Node, Deno, Cloudflare Workers or a folder of static files.
Three files make an app. The terminal is real - type into it.
import { server } from 'weft';
import { db } from '../server/db';
import Counter from '../islands/Counter';
export const load = server(() => db.posts.latest(5));
export default function Home({ data }) {
return (
<main>
{data.map((p) => <a href={`/blog/${p.slug}`}>{p.title}</a>)}
<Counter start={3} />
</main>
);
}
import { sqlite } from 'weft/db';
// never sent to the browser - weft refuses to bundle it
export const db = sqlite('app.db', {
posts: { slug: 'text', title: 'text', at: 'date' },
});
import { signal } from 'weft';
// an island: 0.6 KB of JavaScript, awake when it scrolls into view
export default function Counter({ start }: { start: number }) {
const n = signal(start);
return <button onClick={() => n.value++}>{n}</button>;
}
Keys: ↑ history, Tab completes, Ctrl L clears.
The same blog app, built three ways. Lower is better, except where it says otherwise.
weft-bench 2.3 · Apple M3 Pro, 64 connections, 30 s per run, median of five · the harness and the raw runs are in the repository.
We deleted our whole API package - 4,000 lines of handlers and types that only existed to keep two codebases in sync.
Priya RamanStaff engineer, TidewaterOur landing page went from 180 KB of JavaScript to 11. Same design, same team, one afternoon.
Jonas WeberFrontend lead, Kestrel BankThe error messages tell you which file to open and which line to change. I read them instead of searching.
Ana FerreiraIndie developer, LisbonAn adapter is one line in your package.json. Switch it and build again.
One binary with your app inside - weft build --compile.
Node 20 and later, as a plain HTTP handler or behind your own server.
With permissions written for you: net, read and env, nothing else.
Each route a function, the islands on the CDN.
Prerenders every route it can and tells you which ones it could not.
A 38 MB image from a Dockerfile weft writes - read it before you use it.
A minor release every quarter; an upgrade is one command and has needed no codemod since 4.0.
4.3 Partial prerendering
A route's static shell comes from the CDN; its islands are filled in at the edge.
4.2 Islands that stream
4.1 Routes you can type
Links are checked by the compiler: a renamed file fails the build, not your users.
4.0 One thread
server() functions live in the file that calls them; the API layer is
gone.
One command makes a project. The tutorial takes twenty minutes and ends with an app on the internet.
bun create weft@latest