Files
claw-code/rust
Yeachan-Heo 2ad2ec087f Expose real workspace context in status output
Expand /status so it reports the current working directory, whether the CLI is operating on a live REPL or resumed session file, how many Claude config files were loaded, and how many instruction memory files were discovered. This makes status feel more like an operator dashboard instead of a bare token counter while still only surfacing metadata we can inspect locally.

Constraint: Status must only report context available from the current filesystem and session state
Rejected: Include guessed project metadata or upstream-only fields | would make the status output look richer than the implementation actually is
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep status additive and local-truthful; avoid inventing context that is not directly discoverable
Tested: cargo fmt --manifest-path ./rust/Cargo.toml --all; cargo clippy --manifest-path ./rust/Cargo.toml --workspace --all-targets -- -D warnings; cargo test --manifest-path ./rust/Cargo.toml --workspace
Not-tested: Manual interactive comparison of REPL /status versus resumed-session /status
2026-03-31 20:22:59 +00:00
..
2026-03-31 17:43:09 +00:00
2026-03-31 17:43:09 +00:00

Rust port foundation

This directory contains the first compatibility-first Rust foundation for a drop-in Claude Code CLI replacement.

Current milestone

This initial milestone focuses on harness-first scaffolding, not full feature parity:

  • a Cargo workspace aligned to major upstream seams
  • a placeholder CLI crate (rusty-claude-cli)
  • runtime, command, and tool registry skeleton crates
  • a compat-harness crate that reads the upstream TypeScript sources in ../src/
  • tests that prove upstream manifests/bootstrap hints can be extracted from the leaked TypeScript codebase

Workspace layout

rust/
├── Cargo.toml
├── README.md
├── crates/
│   ├── rusty-claude-cli/
│   ├── runtime/
│   ├── commands/
│   ├── tools/
│   └── compat-harness/
└── tests/

How to use

From this directory:

cargo fmt --all
cargo check --workspace
cargo test --workspace
cargo run -p rusty-claude-cli -- --help
cargo run -p rusty-claude-cli -- dump-manifests
cargo run -p rusty-claude-cli -- bootstrap-plan

Design notes

The shape follows the PRD's harness-first recommendation:

  1. Extract observable upstream command/tool/bootstrap facts first.
  2. Keep Rust module boundaries recognizable.
  3. Grow runtime compatibility behind proof artifacts.
  4. Document explicit gaps instead of implying drop-in parity too early.

Relationship to the root README

The repository root README explains the leaked TypeScript codebase. This document tracks the Rust replacement effort that lives in rust/.