我改用 Rust 重写之后

·

观点分析 · 2026/10/22

这条推文以幽默方式呈现了开发者让 Claude 将整个 PHP 代码库重写为地道 Rust 的场景,要求保留全部功能、API、数据库行为和业务逻辑,并先分析架构、系统迁移、补充测试、确保编译通过。正文在关键处截断。

内容简短且带幽默色彩,适合了解开发者如何用 AI 进行跨语言重写的典型思路与风险点。

Me after rewriting to Rust

<hr />Marc Köhlbrugge: claude -p "Rewrite this entire PHP codebase in idiomatic Rust, preserving all existing functionality, APIs, database behavior, and business logic. Analyze the architecture first, migrate systematically, add tests, and ensure the final project compiles and passes all tests. Do not

资讯配图

阅读原文

参与讨论