hnq.me
all concepts
web Updated 2026-07-09

Zero VM

A beginner-friendly guide to understanding requests that bypass VM execution.

On this page 2026-07-09

A beginner-friendly guide to understanding Zero-VM paths: the idea that some requests should not enter a virtual machine or runtime at all.

zerovm is a small name for a practical runtime instinct:

not every request needs code execution

Table of Contents

The Simple Idea

Zero-VM means serving something without entering a VM.

Some requests need logic.

Some requests just need bytes.

Example:

/app.js    -> static file
/logo.png  -> static file
/dashboard -> runtime route

The static files do not need language execution.

They can be served directly by the host.

Why Zero-VM Exists

VMs and runtimes are useful.

But they have a cost.

They may need to:

  • resolve a tenant,
  • load bytecode,
  • create runtime state,
  • execute instructions,
  • call handlers,
  • build a response.

For a static file, that is unnecessary.

If the request is only asking for an image, CSS file, JavaScript file, font, or cached asset, the host can serve it directly.

That is the Zero-VM path.

Runtime Path vs Zero-VM Path

Runtime path:

request -> tenant -> route -> VM -> handler -> response

Zero-VM path:

request -> static lookup -> file response

Both paths are useful.

The runtime path handles behavior.

The Zero-VM path handles assets.

The design question is:

does this request need logic, or just delivery?

Static Assets

Static assets are the most obvious Zero-VM use case.

Examples:

  • images,
  • CSS,
  • JavaScript bundles,
  • fonts,
  • icons,
  • downloads,
  • cached generated files.

Serving these through a VM can waste work.

The host already knows how to stream files.

The VM should be saved for requests that need logic.

Why This Matters

Zero-VM paths can improve:

  • latency,
  • throughput,
  • memory use,
  • runtime simplicity,
  • cache behavior,
  • failure isolation.

They also make architecture clearer.

A runtime should not become the answer to every request by default.

Sometimes the best runtime decision is:

do not enter the runtime

Zero-VM And Boundaries

Zero-VM is also a boundary idea.

It separates:

asset delivery
from
logic execution

That separation matters because static files should not need tenant code to run.

The host can enforce file rules, caching rules, and path rules directly.

The VM remains focused on behavior.

A Tiny Request Flow

Imagine a request:

GET /assets/logo.png

The host can check:

is this a static file?
is it allowed?
can it be streamed?

If yes:

serve file

No bytecode.

No VM frame.

No handler call.

Just delivery.

KitJS And Kitwork Notes

Zero-VM is a Kitwork lesson. KitJS is about behavior when a page needs it. Zero-VM is about respecting the cases that do not need behavior at all.

A static file, an image, a favicon, or a pure view should not enter a VM just because the engine has one. The runtime should know when to step aside.

That made performance feel like architecture, not only optimization.

My Learning Notes

Kitwork made this idea feel practical.

Because Kitwork has a custom runtime and VM, it becomes important to choose when that VM should be used.

Tenant logic belongs in the runtime.

Static assets do not always need to enter that path.

The lesson:

a good runtime also knows when not to run

That sentence changed how I think about performance and boundaries.

Zero-VM is not anti-runtime.

It protects the runtime for the work that actually needs it.

Common Misunderstandings

"Zero-VM means no runtime exists."

No. It means a specific request bypasses VM execution.

"Zero-VM is only about performance."

Performance matters, but clarity and separation of responsibilities matter too.

"Static files are simple, so they do not matter."

Static delivery can be a huge part of real traffic. Keeping it simple matters.

"Everything should go through one universal handler."

Not always. A direct path can be cleaner when no logic is needed.

Previous: servertruth

Next: host

Related: router, render, prewarm

Search