Install
openclaw skills install rust-rebuilderPlan and execute incremental project rewrites to Rust with architecture mapping, parity verification, idiomatic Rust guidance, dependency preflight checks, and GitHub upstream synchronization. Use when users ask to port or rewrite existing systems into Rust, need latest Rust feature checks, want migration pitfall prevention, or need continuous sync with source repository commits and pull requests.
openclaw skills install rust-rebuilder使用“分阶段、可验证、可回滚”的方式重写项目到 Rust。优先确保行为等价和可观测性,再做性能与架构优化。
每次执行前先运行:
python3 scripts/check_dependencies.py
自动检测以下依赖是否可用:
grok-search skill,或 grok-search MCP。github-helper skill。若任一缺失,必须输出安装引导并暂停当前重写任务。安装引导顺序:
$skill-installer 安装缺失 skill。https://github.com/Frankieli123/grok-skillhttps://github.com/GuDaStudio/GrokSearchgithub-helper skill 仓库references/rust-backend-guidelines.md。当目标是后端 Rust 代码(例如 API、作业系统、数据库访问、异步任务)时,必须先读取 references/rust-backend-guidelines.md,并在输出中显式说明以下检查点:
enum/newtype 表达状态和不变量;SELECT *;Result 语义且无库级 panic;pub(crate) 优先,模块边界是否收敛。在每次执行中输出以下内容,避免“只给代码不讲迁移依据”:
执行时先读取 references/rust-language-update-playbook.md,并遵循:
执行时读取 references/rewrite-pitfalls-and-antipatterns.md,至少检查:
clone、无效拷贝和性能退化。Result 时的语义丢失。若源项目来自 GitHub,执行时读取 references/github-upstream-sync.md 并优先:
github-helper skill 管理本地克隆与仓库知识快照。scripts/upstream_sync_report.py 生成 upstream 差异报告。grok-search(或 grok-search MCP)。github-helper。docx/xlsx 生成结构化交付物。references/rust-language-update-playbook.md:Rust 版本与特性确认流程、查询模板。references/rust-backend-guidelines.md:后端 Rust 编码规范与审查清单。references/rewrite-pitfalls-and-antipatterns.md:重写误区与排雷清单。references/github-upstream-sync.md:上游仓库同步、commit/PR 映射流程。scripts/check_dependencies.py:检测并引导安装必需 skill/MCP。scripts/upstream_sync_report.py:本地仓库 upstream 差异报告工具。使用以下模板触发技能:
使用 $rust-rebuilder,把 <源项目/模块> 分三批重写到 Rust;每批给出等价验证方案、风险点和与 upstream 同步策略。