# Waku

Waku scores 17 of 28 points on 14 speed features: 8/14 on first-paint levers and 9/14 on other features. Rank 8 of 23, tied with TanStack Start (React), TanStack Start (Solid), Analog, Void (Svelte). Labels: 7 1st-party, 0 Experimental, 3 Third-party, 4 Manual.

- Version checked: waku 1.0.0-rc.5 (latest; no stable 1.0 yet), waku-cache 0.0.2 (optimized branch; no CSS inline or images)
- Performance guide: [Building for Production — Waku](https://waku.gg/guides/building-for-production)
- Issue tracker: https://github.com/wakujs/waku/issues
- Books demo port: [waku-books](https://github.com/MaxwellCohen/waku-books)

## Summary

| Feature | Group | Label | Points |
| --- | --- | --- | --- |
| [Production CSS inlining](https://framework-compare.vercel.app/features/css-inlining.md) | First-paint levers | Manual | 0 |
| [Font optimization](https://framework-compare.vercel.app/features/font-optimization.md) | First-paint levers | Third-party | 1 |
| [Image pipeline](https://framework-compare.vercel.app/features/image-pipeline.md) | First-paint levers | Third-party | 1 |
| [Data/HTML caching](https://framework-compare.vercel.app/features/caching.md) | First-paint levers | 1st-party | 2 |
| [Route prefetching](https://framework-compare.vercel.app/features/route-prefetching.md) | First-paint levers | 1st-party | 2 |
| [Streaming SSR](https://framework-compare.vercel.app/features/streaming-ssr.md) | First-paint levers | 1st-party | 2 |
| [Early Hints / preload headers](https://framework-compare.vercel.app/features/early-hints.md) | First-paint levers | Manual | 0 |
| [Islands / partial hydration / lazy slices](https://framework-compare.vercel.app/features/islands.md) | Other features | 1st-party | 2 |
| [Per-route render modes](https://framework-compare.vercel.app/features/render-modes.md) | Other features | 1st-party | 2 |
| [Fine-grained client reactivity](https://framework-compare.vercel.app/features/reactivity.md) | Other features | 1st-party | 2 |
| [Built-in bundle analysis](https://framework-compare.vercel.app/features/bundle-analysis.md) | Other features | Third-party | 1 |
| [Third-party script strategies](https://framework-compare.vercel.app/features/third-party-scripts.md) | Other features | Manual | 0 |
| [Portable multi-host deployment](https://framework-compare.vercel.app/features/multi-host-deployment.md) | Other features | 1st-party | 2 |
| [Service worker / offline support](https://framework-compare.vercel.app/features/service-worker.md) | Other features | Manual | 0 |

## First-paint levers

### Production CSS inlining

Label: **Manual** (0 of 2 points).

Nothing to enable, and no first-party inlining is documented; the HTML links the built stylesheet ([styling docs](https://waku.gg/#styling), [migration guide](https://waku.gg/guides/migrating-from-nextjs) on CSS).

Example of building it yourself:

In the root layout, import the stylesheet with Vite's `?inline` query instead of as a side effect. Render it as a React 19 `<style>` with `href` and `precedence`, and React hoists it into `<head>`. The CSS string also travels in the RSC payload, so keep it small.

```tsx
// src/pages/_layout.tsx
import appCss from '../styles.css?inline'; // was: import '../styles.css';
// …
export default function RootLayout({ children }: { children: ReactNode }) {
  return (
    <>
      <title>Waku Books</title>
      <style href="app-css" precedence="default">{appCss}</style>
      {/* … */}
    </>
  );
}
```

### Font optimization

Label: **Third-party** (1 of 2 points).

Waku's docs recommend `@fontsource/*` because there is no `next/font` equivalent ([migration guide](https://waku.gg/guides/migrating-from-nextjs)). This is the `optimized` branch; `main` still loads Geist from `fonts.googleapis.com` with `display=block`.

```css
@import '@fontsource-variable/geist';
```

*From this repo's `waku-books/src/styles.css` (`optimized` branch).*

### Image pipeline

Label: **Third-party** (1 of 2 points).

No first-party pipeline is documented: the [migration guide](https://waku.gg/guides/migrating-from-nextjs) says use `<img>` or an image CDN, with no built-in resizing or format negotiation ([static assets](https://waku.gg/#static-assets)). This port rewrites Goodreads' `m` size token to `l` but emits no `srcset`.

Example of building it yourself:

There is no image component, so the port renders a plain `<img>` and rewrites the Goodreads URL itself. The regex swaps the medium-size token `m` for the large `l`. There is no resizing, `srcset` or format negotiation.

```tsx
// src/features/book/book-constants.ts
export function getLargeBookImageUrl(url: string): string {
  return url.replace(/^(https:\/\/images\.gr-assets\.com\/books\/\d+)m(\/\d+\.jpg)$/, '$1l$2');
}

// src/features/book/components/book-cover.tsx
const resolved = getLargeBookImageUrl(src ?? EMPTY_IMAGE_URL);
// …
<img
  alt={title}
  decoding="async"
  fetchPriority={priority ? 'high' : 'auto'}
  sizes={sizes}
  src={resolved}
/>
```

Source: [Waku: Static assets](https://waku.gg/#static-assets)

Art direction with `<picture>` (Manual, not scored):

No first-party support is documented ([migration guide](https://waku.gg/guides/migrating-from-nextjs)); use a plain `<img>`; any `<picture>` would be hand-written.

There is no image component, so write the `<picture>` in the port's cover component. Wide screens get Goodreads' large cover, and narrow screens keep the medium one. React spells the attribute `srcSet`.

```tsx
// src/features/book/components/book-cover.tsx
'use client';
// …
const small = src ?? EMPTY_IMAGE_URL;
const large = getLargeBookImageUrl(small);

return (
  <picture>
    <source media="(min-width: 768px)" srcSet={large} />
    <img
      alt={title}
      className="absolute inset-0 size-full object-cover"
      decoding="async"
      fetchPriority={priority ? 'high' : 'auto'}
      onError={() => setFailedSrc(small)}
      src={small}
    />
  </picture>
);
```

### Data/HTML caching

Label: **1st-party** (2 of 2 points).

[`waku-cache`](https://waku.gg/guides/explicit-caching) is a separate, still-evolving package from the wakujs org; Waku has no core cache by design, and the [migration guide](https://waku.gg/guides/migrating-from-nextjs) says to add caching explicitly. The current `waku-cache` (0.0.2) requires Waku 1.0.0-rc.4 or later; this port runs rc.5 with `waku-cache` 0.0.2.

```ts
// ./src/lib/cache.ts
import { createCache } from 'waku-cache';
import { memoryStore } from 'waku-cache/stores/memory';
export const cache = createCache({
  store: memoryStore(),
  defaults: { ttl: 60_000 },
});
```

*Adapted from [the explicit-caching guide](https://waku.gg/guides/explicit-caching); the guide notes the memory store is process-local.* On `optimized` this port uses it in `src/lib/catalog-cache.ts`: a memory store in front of each host's shared store (Workers KV, Vercel Runtime Cache or Netlify Blobs) through `unstorageStore`. `src/middleware/html-cache-control.ts` sets the HTML `Cache-Control` (`main` has neither).

### Route prefetching

Label: **1st-party** (2 of 2 points).

[`router.prefetch()`](https://waku.gg/#navigation) is the manual API, documented under `useRouter` with no experimental marker. The [navigation-prefetching guide](https://waku.gg/guides/navigation-prefetching) is tagged Experimental and says its prefetch and instant-navigation props are experimental: the `Link` helpers are `unstable_prefetchOnEnter` / `unstable_prefetchOnView`, and `Link` prefetch is off unless a prop is set. This port uses the props on `FastLink` and `HoverPrefetchLink`.

```tsx
<Link
  to={hrefToTarget(href)}
  unstable_prefetchOnEnter={prefetchOnEnter}
  unstable_prefetchOnView={prefetchOnView}
/>
```

*From this repo's `waku-books/src/components/ui/fast-link.tsx` (`optimized` branch; other props omitted).*

Gotchas:

- Preloading is off until you pass a prop to the link.

### Streaming SSR

Label: **1st-party** (2 of 2 points).

Waku renders React Server Components to a stream, and a `<Suspense>` boundary around an async server component sends its fallback with the shell. There is no flag. The docs describe this only in passing: the [redirects and not-found guide](https://waku.gg/guides/redirects-and-not-found) covers what happens "inside a Suspense boundary after the shell has already been sent".

Example of building it yourself:

Make the slow part an async server component and wrap it in `<Suspense>`. Waku sends the page shell with the fallback first, then streams the pagination once its count query resolves.

```tsx
// src/pages/index.tsx
import { Suspense } from 'react';

export default async function HomePage({ query }: { query: string }) {
  const searchParams = parseSearchParams(queryToRecord(query));
  const books = await getBooksPage(toBookQuery(searchParams));
  return (
    <div>
      <BookGrid books={books} searchParams={searchParams} />
      <footer>
        <Suspense fallback={<BookPaginationSkeleton />}>
          <BookPagination searchParams={searchParams} />
        </Suspense>
      </footer>
    </div>
  );
}

// src/features/book/components/book-pagination.tsx
export async function BookPagination({ searchParams }: { searchParams: SearchParams }) {
  const totalResults = await getBooksCount(toBookFilters(toBookQuery(searchParams)));
  // … render page links
}
```

Source: [Waku: Redirects and not found](https://waku.gg/guides/redirects-and-not-found) · [React: Suspense](https://react.dev/reference/react/Suspense)

### Early Hints / preload headers

Label: **Manual** (0 of 2 points).

No first-party preload headers or Early Hints are documented on [waku.gg](https://waku.gg/). Add a `Link` header at the host or CDN.

Example of building it yourself:

Add a Hono middleware that sets a `Link` header on HTML responses. This one preconnects to the font host. To preload a built file with a hashed name, read its URL from the Vite manifest.

```ts
// src/middleware/link-header.ts
import type { MiddlewareHandler } from 'hono';

const LINK = '<https://fonts.gstatic.com>; rel=preconnect; crossorigin';

export default (): MiddlewareHandler => async (c, next) => {
  await next();
  if (c.res.headers.get('content-type')?.includes('text/html')) c.res.headers.set('Link', LINK);
};
```

Source: [Hono middleware](https://hono.dev/docs/guides/middleware)

## Other features

### Islands / partial hydration / lazy slices

Label: **1st-party** (2 of 2 points).

[`lazy slices`](https://waku.gg/#lazy-slices) are documented as similar to Astro's server islands. There is no partial hydration.

```tsx
<Slice id="two" lazy fallback={<p>Two is loading...</p>} />
```

*Adapted from [the Waku docs](https://waku.gg/#lazy-slices).*

### Per-route render modes

Label: **1st-party** (2 of 2 points).

Export a `getConfig` that returns `render: 'static' | 'dynamic'` per page, layout, or slice ([routing](https://waku.gg/#routing), [slices](https://waku.gg/#slices)).

```tsx
export const getConfig = async () => {
  return {
    render: 'dynamic',
  } as const;
};
```

*From this repo's `waku-books/src/pages/[id].tsx` (`optimized` branch).*

### Fine-grained client reactivity

Label: **1st-party** (2 of 2 points).

React; the first-party [React Compiler](https://react.dev/learn/react-compiler) is enabled via a Babel preset (on both `main` and `optimized` in this port).

```ts
plugins: [tailwindcss(), react(), babel({ presets: [reactCompilerPreset()] })],
```

*From this repo's `waku-books/waku.config.ts` (`optimized` branch).*

### Built-in bundle analysis

Label: **Third-party** (1 of 2 points).

No first-party analyzer is documented ([migration guide](https://waku.gg/guides/migrating-from-nextjs) covers none); [rollup-plugin-visualizer](https://github.com/btd/rollup-plugin-visualizer), not configured here.

Example of building it yourself:

Add `rollup-plugin-visualizer` under `vite.plugins` in `waku.config.ts`. `waku build` then writes a treemap of the bundle to `stats.html`.

```ts
// waku.config.ts
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import { visualizer } from 'rollup-plugin-visualizer';
import { defineConfig } from 'waku/config';

export default defineConfig({
  vite: {
    plugins: [
      tailwindcss(),
      react(),
      visualizer({ filename: 'stats.html', gzipSize: true }),
    ],
  },
});
```

Source: [rollup-plugin-visualizer: README](https://github.com/btd/rollup-plugin-visualizer)

### Third-party script strategies

Label: **Manual** (0 of 2 points).

The [migration guide](https://waku.gg/guides/migrating-from-nextjs) documents no `next/script` equivalent; nothing to enable.

Example of building it yourself:

React 19 hoists an `<script async src>` rendered anywhere into `<head>` and deduplicates it. For a lazy strategy, write a small client component that injects the tag after load.

```tsx
// src/components/lazy-script.tsx
'use client';
import { useEffect } from 'react';

export function LazyScript({ src }: { src: string }) {
  useEffect(() => {
    const inject = () => {
      if (document.querySelector(`script[src="${src}"]`)) return;
      const s = Object.assign(document.createElement('script'), { src, async: true });
      document.head.append(s);
    };
    const idle = () => ('requestIdleCallback' in window ? requestIdleCallback(inject) : setTimeout(inject));
    if (document.readyState === 'complete') idle();
    else addEventListener('load', idle, { once: true });
  }, [src]);
  return null;
}

// src/pages/_layout.tsx
<script async src="https://example.com/critical.js" />        {/* afterInteractive-ish */}
<LazyScript src="https://example-analytics.com/script.js" />  {/* lazyOnload */}
```

### Portable multi-host deployment

Label: **1st-party** (2 of 2 points).

Use [`adapters`](https://waku.gg/#deployment) for Node, Vercel, Netlify, and Cloudflare, plus experimental Deno, Bun, and AWS Lambda adapters.

```sh
NETLIFY=1 npm run build
CLOUDFLARE=1 npm run build
```

*From [the Waku deployment docs](https://waku.gg/#deployment).*

Gotchas:

- Waku's Deno, Bun, and Lambda adapters are experimental.

### Service worker / offline support

Label: **Manual** (0 of 2 points).

No service worker support is documented. Put a hand-written worker in the [`public` folder](https://waku.gg/#static-assets) and register it from a client component.

Example of building it yourself:

Put a hand-written worker in `public/` and register it with an inline script in the root layout.

```js
// public/sw.js
const CACHE = 'books-v1'; // change the name on each deploy

self.addEventListener('activate', (event) => {
  event.waitUntil(
    caches.keys().then((keys) => Promise.all(keys.filter((k) => k !== CACHE).map((k) => caches.delete(k)))),
  );
});

self.addEventListener('fetch', (event) => {
  const { request } = event;
  if (request.method !== 'GET' || new URL(request.url).origin !== location.origin) return;
  // Network first, so pages stay current. The cached copy answers when offline.
  event.respondWith(
    fetch(request)
      .then((response) => {
        const copy = response.clone();
        caches.open(CACHE).then((cache) => cache.put(request, copy));
        return response;
      })
      .catch(() => caches.match(request)),
  );
});
```

```tsx
// src/pages/_layout.tsx
const swScript = `if('serviceWorker' in navigator)addEventListener('load',function(){navigator.serviceWorker.register('/sw.js')});`;
// … inside RootLayout
      <script dangerouslySetInnerHTML={{ __html: swScript }} />
```

Source: [Using Service Workers (MDN)](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers) · [Waku static assets](https://waku.gg/#static-assets)

## Other performance features

instant navigation ([v1 RC post](https://waku.gg/blog/waku-v1-rc)).

## Deployments of the Books demo

| Branch | Note | Vercel | Netlify | Cloudflare |
| --- | --- | --- | --- | --- |
| `main` | vibe port | https://waku-books.vercel.app | https://waku-books.netlify.app | https://waku-books.to-email-max.workers.dev |
| `optimized` | cache + fonts | https://waku-books-optimized.vercel.app | https://waku-books-max-optimized.netlify.app | https://waku-books-optimized.to-email-max.workers.dev |

## Benchmark, 2026-11-28

Tool: PageSpeed Insights v5 (Lighthouse lab run), mobile strategy. 3 measured runs per deployment, median reported; cold runs are left out of the median when a warm run exists. Each build's figure is the average of its hosts' medians (vercel, netlify, cloudflare). Pages measured: book list (/) and one book (/10145787). Times are lab values from one run on 2026-11-28. FCP is the Lighthouse estimate for simulated Slow 4G; Raw FCP, where shown, is the first paint in the real, unthrottled load that estimate is built from. Builds in the same FCP band (https://framework-compare.vercel.app/measured.md) are a tie, so read "fastest first" as band order.

| Page | Build | Branch | Hosts | Performance | FCP | Raw FCP | LCP | TBT | CLS |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| book list (/) | baseline | `main` | cloudflare, netlify, vercel | 82 | 1.55 s | 0.98 s | 4.64 s | 0 ms | 0.000 |
| book list (/) | optimized | `optimized` | cloudflare, netlify, vercel | 92 | 0.91 s | 1.68 s | 3.06 s | 0 ms | 0.000 |
| one book (/10145787) | baseline | `main` | cloudflare, netlify, vercel | 94 | 1.51 s | 0.62 s | 2.94 s | 0 ms | 0.000 |
| one book (/10145787) | optimized | `optimized` | cloudflare, netlify, vercel | 98 | 0.91 s | 0.26 s | 2.27 s | 0 ms | 0.000 |

Full run: https://framework-compare.vercel.app/benchmark.md

---

HTML version: https://framework-compare.vercel.app/frameworks/waku · All pages: https://framework-compare.vercel.app/llms.txt · Data: https://framework-compare.vercel.app/api/index.json
