Workflow
不到 2 个月,OpenAI 火速用 Rust 重写 AI 编程工具。尤雨溪也觉得 Rust 香!
程序员的那些事·2025-06-06 00:32

Group 1 - OpenAI has rewritten its AI command-line programming tool Codex CLI in Rust to enhance performance and security while eliminating dependency on Node.js, which may frustrate some users [1][2] - Codex CLI is an experimental programming agent that can run in the ChatGPT web browser environment and locally, featuring a chat-based user interface that operates in both interactive and silent modes [1] - The source code of Codex CLI was originally in TypeScript and required Node.js, but the team has now completed the rewrite in Rust [1][5] Group 2 - The decision to rewrite in Rust is driven by four key reasons: zero dependency installation, sandboxing requirements, performance optimization, and the ability to reuse existing Rust-based Model Context Protocol (MCP) implementations [2][4] - The current tool requires Node.js version 22 or higher, which may pose a barrier for some users [4] - Rust's lack of a runtime garbage collection mechanism leads to lower memory requirements, contributing to performance improvements [5] Group 3 - The Codex project currently has a composition of 46.7% Rust, making it the leading language, followed by TypeScript at 44.7% [5] - Codex CLI will still support code extensions in other languages such as JavaScript and Python, although specific details are yet to be disclosed [5] - Vue creator Evan You has also praised Rust for its efficiency, noting that the new version of Vite, using Rust-based Rolldown, has reduced production build times by 3 to 16 times and memory usage by up to 100 times [6]