{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "morganlinton-beautifulrust--port-a-python-or-go-module-to-rust-with-tests-first",
 "repo": "morganlinton/BeautifulRust",
 "repo_url": "https://github.com/morganlinton/BeautifulRust",
 "repo_slug": "morganlinton-beautifulrust",
 "title": "Port a Python, Go or C module to Rust with the tests ported first",
 "page_title": "How to port a Python, Go or C module to Rust with the tests ported first with Beautiful Rust",
 "summary": "Use rust-port to move code to Rust while proving the behavior matches.",
 "who": "A team rewriting a slow Python or Go module in Rust who cannot afford behavior changes.",
 "problem": "Rewrites drift from the original because nobody checks that both versions behave the same.",
 "outcome": "An idiomatic Rust port whose ported tests pass against the same cases as the original.",
 "steps": [
  "Install the skills; review and port lean on rust-best-practices, so install all three",
  "Point the agent at the source module in C, C++, Python, Go or JavaScript",
  "Let rust-port port the original tests first",
  "Have it port the code until `cargo test` and clippy pass",
  "Compare outputs of the old and new versions on real inputs"
 ],
 "agent_prompt": "Use the rust-port skill from morganlinton/BeautifulRust to port <module> from <language> to Rust. Port the tests first, then the code, and do not finish until cargo test and clippy pass.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Advanced",
 "time": "half a day",
 "basis": "readme",
 "caveat": "This card is written from the morganlinton/BeautifulRust README, not from a test run by Deduped. Before you start, make sure you have a Rust project and stable Rust. Check the repo for newer instructions before you rely on these steps.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "A Rust project and stable Rust",
  "Node 22.20+ for npx skills, or Claude Code, GitHub CLI 2.90+ or Gemini CLI",
  "clippy for the lints config"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/morganlinton-beautifulrust/port-a-python-or-go-module-to-rust-with-tests-first/",
 "md": "https://dedupedai.com/use-cases/morganlinton-beautifulrust/port-a-python-or-go-module-to-rust-with-tests-first/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/morganlinton-beautifulrust--port-a-python-or-go-module-to-rust-with-tests-first.json",
 "api_version": "v1"
}
