Skip to content

Rewrite in Rust for performance #10

Description

@levibe

The statusline script is invoked by Claude Code roughly every 300ms. The current shell implementation spawns multiple subprocesses per invocation (git, grep, date, etc.), which adds up at that cadence.

cstat demonstrates that a Rust implementation can achieve ~33x faster execution (2ms vs 62ms) by eliminating subprocess spawns entirely and doing all parsing natively. At ~300ms invocation intervals, 62ms per call is significant overhead while 2ms is negligible.

Goals

  • Zero subprocess spawns per invocation
  • Native parsing of transcript JSON, git status, and token counts
  • Maintain feature parity with the current shell implementation
  • Single standalone binary with no runtime dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    what-ifA speculative idea, not a commitment

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions