GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Overbaker/hapi-rust: Run 100+ local Claude Code, Codex & AI coding agent sessions from any browser/PWA — 4.4 MiB Rust session wrapper (19x less RAM than Bun/TS) + auto-hibernation.

BranchesTags
Open more actions menu

Latest commit

 

History

2,319 Commits
2,319 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
assets/brand
assets/brand
 
 
cli
cli
 
 
crates
crates
 
 
docs
docs
 
 
e2e
e2e
 
 
hub
hub
 
 
relay
relay
 
 
scripts
scripts
 
 
shared
shared
 
 
web
web
 
 
website
website
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
bun.lock
bun.lock
 
 
bunfig.toml
bunfig.toml
 
 
llms.txt
llms.txt
 
 
package.json
package.json
 
 
playwright.attachments.config.ts
playwright.attachments.config.ts
 
 
playwright.config.ts
playwright.config.ts
 
 
playwright.image-drag.config.ts
playwright.image-drag.config.ts
 
 
playwright.image-preview.config.ts
playwright.image-preview.config.ts
 
 
playwright.late-command.config.ts
playwright.late-command.config.ts
 
 
tsconfig.base.json
tsconfig.base.json
 
 

Repository files navigation

HAPI-Rust — 4.4 MiB Rust session wrapper for Claude Code, Codex, Antigravity & Pi

Latest Release License: AGPL-3.0 Good First Issues Help Wanted

Docs · Benchmarks · Downloads · Contribute · Discussions


HAPI-Rust is a local-first remote controller and 4.4 MiB Rust session wrapper for Claude Code, OpenAI Codex, Antigravity, Pi, OpenCode, and Cursor Agent — forked from tiann/hapi (which stays TypeScript-only per tiann/hapi#2534) so one Linux or Windows machine can keep 100+ AI coding sessions open with 24 h auto-hibernation and free Web/PWA control. (Unrelated to Houdini Engine's hapi-rs crate.)

Benchmarks

HAPI-Rust vs TypeScript/Bun wrapper memory and startup latency benchmarks

View full measured tables (29 live Linux sessions + 10-session controlled cohorts)

Real-World Production Memory (2026-11-21 · 29 Live Sessions · 3 Linux Hosts · Wrapper PSS)

Wrapper Runtime Live Sessions Median PSS Range
Rust (claude, codex, agy) 10 4.4 MiB 2.2–6.5 MiB
TypeScript / Bun (claude, codex, agy, pi) 19 83.7 MiB 45.8–242.0 MiB

Controlled 10-Session Comparison (Linux/WSL2 · RSS / PSS / USS & Startup p50/p95)

Cohort Sessions Compiled TS (RSS / PSS / USS) Rust (RSS / PSS / USS) Startup p50/p95 (TS → Rust)
HTTP light, single 1 98.6 / 95.9 / 95.7 MiB 7.3 / 5.3 / 5.2 MiB —
HTTP light 10 97.8 / 52.5 / 48.1 MiB 7.2 / 1.38 / 0.89 MiB 238/246 ms → 8/11 ms
HTTPS light 10 98.9 / 52.5 / 47.9 MiB 8.2 / 1.73 / 1.19 MiB 280/290 ms → 11/14 ms
HTTPS loaded (30 turns, ~1 MB JSONL, 1 live PTY) 10 101.7 / 55.1 / 50.5 MiB 8.6 / 2.07 / 1.53 MiB 277/291 ms → 12/15 ms

Architecture

HAPI-Rust architecture diagram

Quick Start

Download linux-x64, linux-arm64, or windows-x64 from Latest Release and keep hapi + hapi-session-wrapper in the same bin directory. (Upstream npm @twsxtd/hapi has no Rust wrapper.)

hapi hub --relay   # start local hub with E2E encrypted WireGuard + TLS relay
hapi claude        # or: hapi codex (uses Rust wrapper automatically)
Switch Default Purpose
HAPI_RUST_WRAPPER_FLAVORS all supported Restrict flavors (e.g. claude,codex) or none for TS everywhere
HAPI_SESSION_HIBERNATE_MS 86400000 (24 h) Auto-hibernate idle sessions (0 disables · manual: hapi hibernate --help)
Build from source (Bun 1.4.4 + Rust stable)
git clone https://github.com/Overbaker/hapi-rust.git && cd hapi-rust
bun install && bun run build:single-exe
cargo build --release -p hapi-session-wrapper

Fork Diff & Platforms

HAPI-Rust (Overbaker/hapi-rust) Upstream (tiann/hapi)
Session wrapper Rust (claude, codex, agy, pi exp.) + TS auto-fallback TypeScript (Bun)
Wrapper RAM / start 4.4 MiB median · 11 ms cold start 83.7 MiB · 280 ms
Idle sessions 24 h auto-hibernate, wake on next message Stay running
Platforms (Rust) Linux x64/arm64 (claude, codex, agy, pi*) · Windows x64 (codex) · TS fallback elsewhere TS everywhere
Token usage page Every namespace sees its own sessions and machines Hub owner (default namespace) only
Per-user settings Every namespace has its own General/Chat settings (translation default, session summaries, spawn-peer defaults, Cursor auto-retry) Hub owner (default namespace) only
Owner settings for namespaces Shared with every namespace by default (PR awareness, voice keys, storage, Codex desktop, Cursor import); owner can switch off Hub owner only
Clients Free Web / PWA only (native mobile app code/promotion removed) Web / PWA + paid iOS/Android

Contributors & Co-Maintainers Wanted

Run cargo test --workspace and bun run test:parity offline without paid LLM API keys. See CONTRIBUTING.md.

Track Open Issues
Good First Issues #15 JSON depth · #16 O_NOFOLLOW open · #17 MCP HTTP task · #27 CI PTY timeout
macOS & Windows #21 Apple Silicon / Intel CI & Windows Claude/Pi
Claude & MCP Parity #25 Rewind / fork-at-message · #26 dynamic MCP link_pr
Process Lifecycle & Flavors #23, #24 subreaper/cgroup · DeepSeek Harness / OpenCode / Cursor Agent
FAQ
  • How is HAPI-Rust different from tiann/hapi? Same hub, Web/PWA, and protocol — replaces the per-session Bun/TS wrapper with a 4.4 MiB Rust binary, adds 24 h auto-hibernation, and focuses purely on Web/PWA.
  • Can one host run 50–100+ Claude Code / Codex sessions? Yes — 100 Rust wrappers take a few hundred MiB total instead of 8–20+ GiB, and idle sessions auto-hibernate after 24 h.
  • What if a feature isn't in Rust yet? Automatic exit-86 fallback to the TypeScript wrapper (or set HAPI_RUST_WRAPPER_FLAVORS=none).
  • Does it work on macOS? Yes via automatic TS fallback today; native macOS Rust builds are tracked in #21.

Built on tiann/hapi (AGPL-3.0). HAPI ("哈皮") is a transliteration of Happy.

About

Run 100+ local Claude Code, Codex & AI coding agent sessions from any browser/PWA — 4.4 MiB Rust session wrapper (19x less RAM than Bun/TS) + auto-hibernation.

overbaker.github.io/hapi-rust/

Topics

ai-agentsclaude-codecodexcoding-agentdeveloper-toolshapilocal-firstmcpptypwaremote-controlrustself-hostedsession-managertokioweb-ui

Resources

Readme
AGPL-3.0 license

Contributing

Contributing

Security policy

Security policy
Activity

Stars

4 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.