Codex CLI is going native
Motivation for the Rust Rewrite
- Official reasons highlighted: performance/efficiency, security, zero-dependency install, and better extensibility for Codex CLI.
- Several commenters interpret “going native” mainly as eliminating the Node/TypeScript runtime so the CLI can ship as a small, self-contained binary, easier to distribute and cross-compile.
Performance, Startup Time, and Packaging
- Many note that most compute happens on remote LLMs, so end-to-end latency won’t change much.
- However, startup time and memory footprint for a CLI are emphasized: avoiding V8/Node (or Python) can cut seconds of startup and large amounts of RAM, which matters for tools run many times per day or on constrained systems.
- Examples are given where similar rewrites (e.g., Python → Rust) yielded big perceived performance gains due to module-loading overhead.
- Counterpoint: Node/TS could also be packaged as single executables (Node SEA, pkg, Bun, Deno), though those tend to produce larger binaries.
Rust vs Node/TypeScript (and Other Languages)
- Some argue Go would have been equally suitable; the choice is seen as partly cultural/fashion.
- Discussion about compiling JS/TS via LLVM: JS’s dynamism makes AoT native compilation tricky; TypeScript doesn’t fix that fundamentally.
- Debate over how much GC vs manual memory management actually matters for this kind of async, I/O-bound CLI; some see GC focus as overblown.
Skepticism and Alternative Explanations
- A faction calls the rewrite “just RIIR” with negligible user-facing benefit, suggesting it mostly reflects developer preference.
- Others stress practical blockers: enterprises reluctant to install Node, security/supply-chain concerns, and Windows/admin friction.
- A few speculate it might be a step toward closing off Codex, but this is walked back after people point to the Rust code living in the same open repo under the existing license.
Broader “Rewrite in Rust” Trend & Language Culture
- The thread connects this to a wider wave of tools moving from scripting/JIT ecosystems to Go/Rust for CLIs.
- Several comments frame language choice as choosing a “culture” and ecosystem preset (tooling, distribution model, priorities like safety vs speed), not just syntax.
- LLMs are seen as making cross-language rewrites easier, which may accelerate such shifts.
LLM Tooling, Quality, and Dogfooding
- People wonder how much of the Rust rewrite was authored by Codex itself; no hard numbers are given.
- There’s debate over Codex vs Claude Code quality; experiences differ sharply.
- One recurring theme: LLMs can generate 70–80% of code quickly, but humans still handle the “last mile” of refinement and convention-matching.