turtle dev
Rebuild only what changed.
Turtle uses Bun metafile inputs as the authoritative dependency graph, then atomically publishes revisioned server modules and browser updates.
Update classification
| Change | Build work | Browser action |
|---|---|---|
| Client Component implementation | Browser + SSR; hot update module | React Refresh, state preserved |
| Server Component implementation | RSC + request runtime | Flight refresh, client state preserved |
| Runtime dependency | Affected runtime graph | Atomic server swap |
| Route shape, client exports, config | Required graphs and manifests | Full document reload |
| Application public file | No framework graph | Full document reload |
Protocol
The dev server exposes an event stream at /__hmr. Successful builds publish revision, duration, optional hot-update URL, Flight-refresh flag, and reload flag. Build failures publish a safe message and leave the last good runtime active. Changes are debounced; edits arriving during a build queue another revision.
React Refresh
Development browser graphs install the React Refresh runtime. Turtle recompiles arbitrary directive-discovered Client Components, registers their exported component identities, imports the revisioned update, and calls performReactRefresh(). Server edits use the installed router's refresh() path instead.
Build outputs
dist/
rsc/render-flight[-revision].js
ssr/render-html[-revision].js
runtime/handle-request[-revision].js
manifests/{route-manifest,client-manifest}.json
meta/{rsc,ssr,browser,runtime,assets}.json
public/assets/
browser.js
hot/refresh-revision.jsVerification
bun run check
bun run build
bun test ./tests
bun run verifyThe conformance suite covers deterministic builds, server/client boundaries, filesystem routing, metadata, handlers, context isolation, assets, navigation, RSC and HTML first-byte streaming, graph-selective HMR, security headers, load, and production artifact leakage.
Bun 1.3.14 production minification and concurrent in-process graph builds are deliberately disabled after full-graph correctness failures. Turtle favors valid deterministic artifacts over speculative build speed.