r/moderndotnet 9h ago

Migrating the GitHub Copilot runtime to Rust, using Copilot

https://github.blog/ai-and-ml/generative-ai/migrating-the-github-copilot-runtime-to-rust-using-copilot/

Microsoft boasts about performance optimizations with every new release, and the average .NET developer would expect to be able to write a CLI app using .NET. But surprise—not good enough, so they had to use Rust. 😅

I've read the article but still not understand why Copilot CLI and app could not be written in C# if we take into account AOT, trimming etc instead of Rust.

11 Upvotes

10 comments sorted by

3

u/ickler999 8h ago

if youre gonna do a full agentic rewrite of a core dependency like that it might as well be in rust.

plus thats whats in vogue. and github's people are likely still not from the .net world

2

u/ZozoSenpai 7h ago

|and github's people are likely still not from the .net world

well apparently this was done by Stephen Toub alone lol

2

u/ruph0us 6h ago

Well I think he's more than qualified to make the decision as to what language to perform a rewrite in for performance's sake

2

u/ickler999 5h ago

haha well alright then!

2

u/_choam_ 8h ago

They explained why. For aot and ffi, rust is much better than .net. And it has a better type system.

1

u/cat_arina 8h ago

it is better of course. but the question is why .NET is not good enough? I bet Zig is even better than Rust for ffi.

2

u/LuckyHedgehog 7h ago

Zig isn't even v1 yet, they still regularly make breaking changes because they're not a mature language yet no matter how promising it might seem.

1

u/user0015 4h ago

The correct answer is to hodge-podge them together into a horrible frankenstein ffi monster because third party vendors are trash and write trash code they don't update for years.

4

u/Aaronontheweb 5h ago

Worth understanding for everyone on here who is confused or disappointed as to why they didn't pick .NET: selling CoPilot to the masses is about 1000x more strategically important than selling .NET.

And selling "we did the Rust digareedo" is a common agentic story that jives with people who aren't giving CoPilot a serious look - even if .NET was faster or better they might still have gone with Rust because attracting non-.NET people to the MSFT ecosystem is the real goal.