---
title: "zerostack: the coding agent that runs on 8MB, not 8GB"
description: "A solo Rust developer shipped a full-featured coding agent with an 8MB RAM footprint. HN argues about whether that even matters."
pubDate: "2026-05-17"
lang: "en"
slug: "zerostack-rust-coding-agent-8mb"
url: "https://hoangyell.com/zerostack-rust-coding-agent-8mb/"
author: "HoangYell"
translation_vi: "https://hoangyell.com/vi/zerostack-rust-coding-agent-8mb/"
categories: ["AI & Agents"]
tags: ["rust", "coding-agents", "developer-tools", "performance", "open-source"]
heroImage: "https://raw.githubusercontent.com/yellcamap/img/refs/heads/main/photo-1571171637578-41bc2dd41cd2.webp"
---

I ran `claude --version` one morning just to check something. My cursor sat there. Four seconds later the terminal printed a version string and nothing else.

Someone on HN named `mohsen1` timed it properly and shared the receipt:

```
$ time claude --version
2.1.143 (Claude Code)

Executed in    4.39 secs      fish           external
   usr time   29.68 millis    0.26 millis   29.41 millis
   sys time   71.30 millis    1.30 millis   70.00 millis
```

That benchmark is now sitting inside the comment thread for [zerostack](https://crates.io/crates/zerostack/1.0.0), a Rust coding agent that appeared on HN yesterday with 335 upvotes.

## The story in one sentence

zerostack is a full-featured coding agent written in 7,000 lines of pure Rust - multi-provider LLM support (OpenRouter, OpenAI, Anthropic, Gemini, Ollama), a four-tier permission system, session management, a structured prompts system, MCP for extended tooling, git worktree integration, and a loop system for long-horizon tasks - with an idle RAM footprint of roughly 8MB and a binary that weighs 8.9MB.

For comparison, opencode and similar JS-based agents run at around 300MB idle.

## Why this hit the front page

The ingredients are classic HN bait: Rust, one developer, a project that grew into something real, and a README with a performance table that makes other tools look embarrassed.

| Metric        | zerostack | opencode / JS agents |
| ------------- | --------- | -------------------- |
| RAM (idle)    | ~8MB      | ~300MB               |
| RAM (working) | ~12MB     | ~300MB+              |
| CPU (idle)    | 0.0%      | ~2%                  |
| CPU (tools)   | ~1.5%     | ~20%                 |
| Binary size   | 8.9MB     | -                    |

The punch lands harder when you look at what you actually get. This is not a stripped-down toy. It has a prompts system with switchable modes - `code`, `plan`, `review`, `debug`, `ask`, `brainstorm`, `frontend-design`, `review-security`, and more. It reads `AGENTS.md` and `CLAUDE.md` from your project root automatically, the same as every other major agent. It has a doom-loop detector that stops the agent when it repeats identical tool calls three times in a row.

In other words: all the features, one-fortieth the memory.

## What the comments are arguing about

*Runtime architecture comparison: ZeroStack (Rust binary 8MB) vs. heavy Node.js agents:*

```markdy
scene width=1100 height=540
theme: light=doodle dark=nebula
layout auto

service RustCLI "zerostack (Single 8.9MB Static Binary)"
module RustCore "Tokio Async + 7k LOC Pure Rust Core"
cluster RustFootprint "Resource Profile: 8MB Idle RAM / 10ms Cold Start"
service HeavyCLI "Node CLI / Electron Agent Runner"
module V8Runtime "Node.js Runtime + V8 JIT + NPM Dependencies"
cluster HeavyFootprint "Resource Profile: 300MB+ Idle RAM / 4.3s Cold Start"

group zerostack_arch "ZeroStack (Native Rust Agent)":
  RustCLI
  RustCore
  RustFootprint

group heavy_arch "Standard Electron / Node.js Agents":
  HeavyCLI
  V8Runtime
  HeavyFootprint

edge e1: RustCLI -> RustCore: "Direct zero-cost abstraction"
edge e2: RustCore -> RustFootprint: "Deterministic minimal footprint"

edge e3: HeavyCLI -> V8Runtime: "V8 engine compilation overhead"
edge e4: V8Runtime -> HeavyFootprint: "Garbage collection & dependency bloat"

beat compare "1/40th Memory Footprint with Zero Tradeoffs" {
  show $nodes stagger=50ms
  glow RustFootprint "Instantaneous 10ms startup, full MCP & multi-provider LLM support"
}

player:
    playback:
      loop true
    controls:
      speed true
      speeds "0.25"
      fullscreen true
      gif true
      theme true
    interaction:
      zoom true
      pan true
      click_to_play true
      double_click_to_reset true
      keyboard false
    chrome:
      badge true
      progress none
```

The top comment came from `throwa356262`, who got straight to the number that made everyone sit up:

> "RAM footprint: ~8MB on an empty session, ~12MB when working. I like this, Claude Code is using multiple gigabytes, which is really annoying on low-end laptops."

Right behind it, `360MustangScope` admitted they were literally in the middle of writing their own Rust agent when zerostack appeared:

> "It's amazing having opencode slowly leak memory and end up becoming 6gbs on a large project and then get slower and slower."

Then the sharpest comment in the whole thread landed from `2001zhaozhao`:

> "It's a bit amusing that coding agents rely on drawing 1000W+ and using 2TB+ of memory in a datacenter to run, yet people really focus on the last few watts and few hundred megabytes of memory on their laptop (which get dwarfed by the energy cost of compiling their code anyways)."

This is technically correct. The model does not run on your machine. The inference is somewhere in a data center, and the energy bill per request dwarfs whatever your laptop client is doing. Whether your local process uses 8MB or 300MB is noise by comparison.

But I think the counter-counter-argument is also right: local client performance is about the _feel_ of a tool, not global energy accounting. A tool that spins at 2% CPU when you are not using it, that takes four seconds to tell you its own version number - that tool is signaling something about the assumptions its authors made. Those assumptions were not mine.

## Should you try it?

**Read the GitHub README if you:** already use a terminal-based agent and want something that does not idle at 2% CPU, are on a machine where 300MB is actually noticeable, want to switch LLM providers without switching tools, or are curious how a solo dev built a full agent stack in ~7k lines.

**Skip it for now if:** you rely on Claude Code's VS Code integration, need tested Windows support (zerostack explicitly does not test this), or your workflow depends on something provider-specific.

The install is one command:

```bash
cargo install zerostack
export OPENROUTER_API_KEY="your-key"
zerostack
```

One commenter (`hiAndrewQuinn`) ran zerostack's entire codebase through another agent to check for concerning patterns and found nothing noteworthy. That is a nice property of a small, readable codebase.

There's also a sandbox mode - install `bubblewrap` and pass `--sandbox` to run every bash command in an isolated environment. That's the kind of feature that suggests the author has thought about what could go wrong.

***

Discussion on [Hacker News](https://news.ycombinator.com/item?id=48164287) · Source: [crates.io](https://crates.io/crates/zerostack/1.0.0) · Submitted by [gidellav](https://news.ycombinator.com/user?id=gidellav)
