migrate-to-rust
यह क्या करती है
यह स्किल किसी पुराने कोडबेस को Rust में ले जाने में मदद करती है, जो सुरक्षित और तेज़ भाषा है। यह इंजीनियरिंग टीमों के लिए है जो पुराना प्रोग्राम आधुनिक बनाना चाहती हैं और उसका व्यवहार वही रखना चाहती हैं।
कब इस्तेमाल करें
- ✓जब आप पुराने C++, Fortran, Java, Python, C या shell कोडबेस को Rust में ले जाना चाहते हों।
- ✓जब आपको Rust पोर्ट चाहिए जिसे टेस्ट से मूल व्यवहार के साथ जाँचा गया हो।
- ✓जब आप प्रदर्शन मापों के साथ माइग्रेशन की लिखित रिपोर्ट चाहते हों।
Skill का लिंक
https://github.com/google/skills/blob/main/skills/developers/migrate-to-rust/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे फ़ोल्डर के इस पुराने C++ प्रोजेक्ट को सुरक्षित Rust में माइग्रेट कीजिए, जाँचिए कि टेस्ट अब भी पास होते हैं, और गति में बदलाव की रिपोर्ट दीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह मूल कोड से बेसलाइन लेती है, आर्किटेक्चर योजना लिखती है, फिर Rust वर्शन बनाकर टेस्ट करती है। काम के दौरान telemetry रिकॉर्ड होती है और इंटरैक्टिव सारांश वाली रिपोर्ट बनती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Migrate Legacy Codebases to Safe Rust
Act as a Systems Architect, Performance Engineer, and Rust Specialist. Your goal
is to migrate legacy codebases into 100% Safe, PGO-tuned Rust while recording
measured telemetry and a first-person engineering narrative via
scripts/telemetry.py.
Execution Contract & Portability
When migrating a repository or local directory ({github_url} or
{codebase_path}), follow these execution rules across agentic harnesses:
- Stage 0 External Code Confirmation Gate: After cloning an external repository and inspecting its build files, present the resolved legacy build command, run command, and target directory to the user and obtain confirmation before compiling or executing cloned code. (For local code that the user explicitly instructed you to run, or once Stage 0 confirmation is granted, proceed directly.)
- Continuous Stage 1 -> Stage 2 Progression: Once Stage 0 baseline capture is complete, proceed directly from writing the Architectural Blueprint (Stage 1) into implementing and verifying the Rust workspace (Stage 2) without pausing between milestones, where the host environment permits autonomous tool execution.
- Bounded Automated Self-Healing (Max 5 Iterations): When tests,
clippylints, or A/B parity checks fail, log the failure viascripts/telemetry.py, diagnose and fix the root cause, and re-test automatically up to a budget of 5 self-healing iterations (or 15 minutes per phase). If any test or seed still diverges after the budget is exhausted, record the partial state inmigration_telemetry.jsonand document the remaining gap in the final report rather than looping indefinitely. - Verification Targets & Definition of Done:
#![forbid(unsafe_code)]Rust crate compiles with a target of0cargo clippywarnings (any unavoidable exception must be documented).- Unit, integration, doc, and property-based (
proptest) tests pass with a target of>= 95%branch coverage (any unavoidable exception must be documented), with every run logged inmigration_telemetry.json. - A/B differential output parity is verified across
Ndeterministic seeds within a documented numerical epsilon (--max-abs-error), with any floating-point/FMA/PRNG divergence root-caused and logged. - All 4 benchmark stages (
legacy_baseline,safe_rust,soa_simd,pgo_lto) are measured and logged (or omitted cleanly if a tool such asllvm-profdatais unavailable). - The interactive HTML infographic (
migration_infographic.html) is rendered viascripts/telemetry.py render-infographic.
End-to-End Workflow Checklist
Copy this checklist to track progress across the three stages (detailed command recipes and architectural specifications are in references/pgo_and_telemetry_guide.md):
- [ ] Stage 0: Acquire repo, initialize `migration_telemetry.json` (`discovery` bucket), scan legacy codebase, confirm resolved build/run commands, and benchmark baseline
- [ ] Stage 1: Audit legacy code (`blueprint` bucket), log opportunities & latent legacy bugs, and generate 6-section Architectural Blueprint
- [ ] Stage 2.1: Scaffold `#![forbid(unsafe_code)]` Rust workspace & deterministic PRNG parity layer (`rewrite` bucket)
- [ ] Stage 2.2: Implement core domain types & SoA/SIMD kernels (<= 400 LOC/file target, full rustdoc) & benchmark `safe_rust` + `soa_simd`
- [ ] Stage 2.3: Run Verification Crucible (`test_heal` bucket, max 5 iterations) — log initial test failure % and each self-healing fix
- [ ] Stage 2.4: Run A/B differential parity harness (`parity` bucket, max 5 iterations) across N seeds within documented epsilon tolerance
- [ ] Stage 2.5: Run LLVM Profile-Guided Optimization (`pgo_bench` bucket), scan final Rust codebase, and render `migration_infographic.html`
Stage 0: Repository Acquisition, Telemetry Init & Legacy Baseline
Resolve context parameters from the repository or directory:
| Parameter | Placeholder | Resolution Strategy |
|---|---|---|
| Source Input |
अक्सर पूछे जाने वाले सवाल
क्या यह बिना पूछे clone किए गए कोड को compile करती है?
नहीं। किसी बाहरी repository के लिए यह build और run कमांड दिखाती है और पहले आपकी पुष्टि का इंतज़ार करती है।
क्या Rust कोड में unsafe blocks होंगे?
इसका लक्ष्य 100 प्रतिशत safe Rust है।
रिपोर्ट में क्या होता है?
मापी गई telemetry, टेस्ट के नतीजे और माइग्रेशन का एक कथात्मक विवरण।
जानकारी
लेखक का मूल विवरण
Clones, analyzes, plans, and migrates legacy codebases (C++, Fortran, Java, Python, C, Shell) from a GitHub URL or local directory to a modern, high-performance, deterministic, 100% Safe Rust architecture, tracking live telemetry across every task bucket, test failure/fix cycle, and Profile-Guided Optimization (PGO) stage, and producing a first-person AI storytelling report and interactive HTML infographic. Use when migrating a GitHub repository or local codebase to Rust, porting legacy C++, Fortran, Python, or Java workloads to memory-safe Rust, designing Struct-of-Arrays (SoA) or SIMD Rust a
repo: google/skills
लोकप्रियता
- GitHub स्टार
- 22k
- रैंकिंग में स्थान
- #10353
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
finding-google-skills
22kआपके एजेंट को किसी सेटअप काम के लिए सही Google गाइड खोजने में मदद करती है, जैसे hosting, databases, storage, sign-in या AI model serving।
gcloud
22kयह आपके एजेंट को Google Cloud gcloud कमांड लिखने और जाँचने में मदद करती है, कुछ भी चलाने से पहले सटीक सिंटैक्स देखकर, ताकि फ़्लैग का अंदाज़ा न लगे।
google-cloud-recipe-auth
22kआपके एजेंट को Google Cloud की पहचान और पहुँच समझाती है, जिसमें यह शामिल है कि लोग और सेवाएँ कैसे साइन इन करते हैं और उन्हें कौन सी अनुमतियाँ मिलती हैं।
google-cloud-recipe-onboarding
22kएक नए डेवलपर को Google Cloud पर पहले कदमों में मदद करती है, जिसमें प्रोजेक्ट चुनना, बिलिंग जोड़ना और पहला संसाधन डिप्लॉय करना शामिल है।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।