一款名为 fast-anything 的新工具已发布,旨在通过利用 AI 编码代理(如 Claude)将应用程序中仅占计算时间约 5% 的热点函数移植到 Rust,从而避免整个应用重写的成本。1 该工具能够自动识别慢函数并生成 Rust 代码。1
为确保替换后的正确性,fast-anything 会通过真实调用记录和边缘案例进行验证。1 具体而言,系统会对比真实记录的调用以及衍生边缘案例(如 NaN、infinity 等),以确保结果一致且速度提升后无缝替换原函数。1
目前,fast-anything 支持 Python、Node.js、Ruby、Java、Go、PHP、C 和 C++ 等多种语言。1 用户可通过提供 CLI 命令、Claude Code 插件及 MCP 服务器进行集成使用。1 该项目采用 MIT 许可证发布。1
A new tool named fast-anything has been released to address performance bottlenecks by migrating only the critical functions of an application to Rust, rather than rewriting entire codebases 1. The tool leverages AI coding agents, such as Claude, to automatically identify slow "hotspot" functions that account for just 5% of total computation time and generate equivalent Rust implementations 1. This approach aims to avoid the high costs associated with full application rewrites while still delivering significant speed improvements 1.
To ensure reliability, fast-anything validates the correctness of the migrated functions by comparing their output against real recorded calls and derived edge cases, including handling values like NaN and infinity 1. The tool supports a wide range of programming languages, including Python, Node.js, Ruby, Java, Go, PHP, C, and C++ 1. It offers seamless integration through CLI commands, a Claude Code plugin, and MCP server support, and is distributed under the MIT license 1.
评论
还没有评论,欢迎留下第一条。