Microsoft Ditches C# for Rust: M365 Core Gets Safety and Perf Boosts
2024-2-2 23:39:53 Author: securityboulevard.com(查看原文) 阅读量:13 收藏

Microsoft CEO Satya Nadella, with superimposed text: “C# is dead”Microsoft 365 “Core Platform Substrate” gets rewrite in Rust language.

A job ad seems to say Microsoft is going all in on Rust—at least, for some core cloud code. It should show security and performance benefits over the C# code it’ll replace.

First we heard parts of Windows were being rewritten, then Azure was becoming Rustified. Now it’s Microsoft 365 getting the oxide treatment.

But what of the futures of C# and dotNET? In today’s SB Blogwatch, we read the runes.

Your humble blogwatcher curated these bloggy bits for your entertainment. Not to mention: dotSWEAT.

C# — Rust in Peas

What’s the craic? Rafly Gilang broke the story—“Microsoft forms “new team” to adopt Rust”:

Modernity
The company is opening a vacancy for Rust-fluent developers. … Microsoft is seeking to recruit new principal software architects to spearhead the Substrate App Platform group, a crucial … team dedicated to integrating Rust into MS365.

At their BlueHat event last year, Microsoft announced plans to rewrite portions of the Windows kernel in Rust, citing its modernity, ease of use, and overall clarity. This same language is employed in the development of the new Azure Quantum Development Kit (QDK), which offers a 100x speed boost and a 100x reduction in code size.

All Webinars

Huh? Luke Jones clarifies and classifies—“Microsoft 365 Core Services to Undergo Rust Transformation”:

Strategic pivot
Rust’s promise of rendering software memory-safe … aligns with industry trends emphasizing secure coding practices. … Microsoft has announced its intentions to leverage the Rust programming language in a significant revamp of its C# core services underpinning Microsoft 365.

[It] suggests a strategic pivot to modernize the company’s cloud services at a global scale with Rust. … As part of the Microsoft 365 Core Platform organization, Substrate App Platform is instrumental in Microsoft’s cloud service infrastructure. Its engagement in adopting Rust implies a significant shift.

Horse’s mouth? Here’s the job blurb—“Principal Software Architect, M365”:

Next-gen scale platform
Microsoft 365 … brings together cloud versions of our most trusted communications and collaboration products like Exchange, SharePoint, and Skype with the desktop suite of office products in an always-up-to-date integrated service offering. … The Substrate App Platform group is part of the M365 Core Platform organization.

We are forming a new team focused on enabling the adoption of the Rust programming language as the foundation to modernizing global scale platform services, and beyond. … We need the best and brightest to … build the next-gen scale platform in the Substrate.

Why? What’s the big idea? Security and energy, thinks Robigus:

Going the Rust route … will give them memory safety (if they leave the guards in place).

[And] Rust uses less energy when running … for the same unit of work: … I saw a table demonstrating where they consumed about 1/3 of the energy of C#. … I would have thought that on Microsoft’s data-centre scale, this would be well worth doing.

How is it safer? chen2011 has two important examples:

It gets the pointer concept and uses right—i.e., the … balance between correctness and flexibility. In comparison, C++ is all flexibility and no real correctness guarantee.

Parallelization for Rust is a small step. For C++, it is almost impossible.

And it’s faster than C#? pjmlp sees the irony:

On one side, we have the .NET team boasting about the performance improvements they have been achieving release after release with runtime and C++ like language features exposed to C#. … On the other side, we have the [Azure] Quantum team rewriting their tooling from C# into Rust citing performance needs. And now this job ad.

Ironic to have a team doing posts about performance, while people from another building are quoting performance as the reasoning for their rewrites into something else. Public perception matters in tooling adoption, even if inside everything is well and dandy.

But StrangerHereMyself finds it strange:

Why? C# is a garbage collected language which is just as safe and much easier to program in than Rust. … Also, C# developers are much easier to find and probably cheaper. … I support the transition to Rust for most C and C++ code, but migrating C# code to Rust is superfluous.

Writing multi-threaded C# code is similar in complexity to C or C++. But it depends on what you’re doing. Web applications are multi-threaded automatically in ASP.NET and you don’t have to write locking code for it. It’s all handled automatically.

Why ask why? Try keltor’s explanation:

C# code appears to have severe performance issues … for various reasons. Now there’s a new System Programming language that’s much safer than C++/C that the C# code replaced but much closer to the performance of well written C++/C code (and like C++, often faster than C for highly parallel vector code).

Meanwhile, are you pondering what this Anonymous Coward is pondering?

Good luck finding actual Rust developers. The only “Rust” people I see are people talking about writing software in Rust.

And Finally:

An excuse to resurrect this And Finally from way back in 2009—when Ballmer was hawking dotNET

Previously in And Finally


You have been reading SB Blogwatch by Richi Jennings. Richi curates the best bloggy bits, finest forums, and weirdest websites … so you don’t have to. Hate mail may be directed to @RiCHi, @richij or [email protected]. Ask your doctor before reading. Your mileage may vary. Past performance is no guarantee of future results. Do not stare into laser with remaining eye. E&OE. 30.

Image sauce: Geraldine le Meur (cc:by; leveled and cropped)

Recent Articles By Author


文章来源: https://securityboulevard.com/2024/02/microsoft-365-rust-richixbw/
如有侵权请联系:admin#unsafe.sh