Port large codebases to a new language in small steps
Stephen Toub describes on the GitHub Blog how the agent runtime behind Copilot was moved from TypeScript to Rust, with Copilot's help. Over roughly fourteen and a half weeks, from 12 May to 21 August, agents wrote most of the Rust in 128 pull requests merged in small slices. About 430,000 lines of TypeScript passed through the port, against 130,000 in the first estimate, and the Rust ended at 832,378 lines. Dozens of bugs are fixed, but more surely exist.
Done with CopilotModerate
What was done
Stephen Toub describes on the GitHub Blog how the agent runtime behind Copilot was moved from TypeScript to Rust, with Copilot's help. Over roughly fourteen and a half weeks, from 12 May to 21 August, agents wrote most of the Rust in 128 pull requests merged in small slices. About 430,000 lines of TypeScript passed through the port, against 130,000 in the first estimate, and the Rust ended at 832,378 lines. Dozens of bugs are fixed, but more surely exist.
How to do it
- Paste the prompt into the tool, and replace the text in brackets with your own.
- Read the answer through. Do not send, delete or publish anything until you have seen it yourself.
- Check the original before you trust a figure, a name or a date.
Try it with Copilot
Port [module] from [old language] to [new language] in small slices. Each slice should replace one component with a thin link to the new code and delete the old one, in one pull request at a time. Run the tests and compare old and new behavior for each slice. Show me the split and the order before anything is changed or merged. You are done when every slice is merged, the old files are deleted and the tests pass.
Replace text in brackets with your own.
GitHub Blog ·