Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does Microsoft apply Rust

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how Microsoft uses Rust". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how Microsoft uses Rust.

Rewrite Windows with Rust

Although Microsoft has not yet completely rewritten Windows with Rust, it is working on how to adapt Rust to its ecosystem. Microsoft estimates that 70% of the security patches pushed to computers are designed to fix memory-related vulnerabilities, which they believe Rust can capture during the development phase. Therefore, Microsoft commissioned some engineers to rewrite some components of Windows with Rust in order to get some opinions from developers.

Although Microsoft did not publicly rewrite which components, an engineer said he was targeted to transform some of the "underlying systems of Windows", reflecting Microsoft's confidence in the potential of Rust. Microsoft plans to rewrite not only some small services and Windows native applications, but also the core components of the operating system.

Engineers described the work involving Rust as "overall optimistic", but also made it clear that Rust did not have some of the important features of C, but these engineers also agreed that it was necessary to develop these features for Rust.

Intel has begun to make Rust implement the same functions as C #, and Microsoft may also join in. Because Rust lacks some of the capabilities of C, the team found that Rust will be most suitable for newly developed Windows components. I wouldn't be surprised if Microsoft migrates some of its code base to Rust.

Microsoft has built a standard Windows library for Rust that has all the features of the C++ version; Linux is also considering migrating some kernels to Rust. There is likely to be competition between the two operating systems to see who can put Rust code into production first.

Integrate Rust into Azure services

DeisLabs is one of Azure's incubator projects dedicated to building tools for Kubernetes. Recently, it chose Rust to develop a new product, Krustlet, which allows developers to run multiple WebAssembly modules in Kubernetes.

Kubernetes was originally developed by Google and written in the Go language. Most engineers tend to use Go to write components for Kubernetes, and DeisLabs's choice of Rust is amazing.

In the end, the decision seems to have worked. Although employees did mention that the transition to Rust was difficult because of Rust's unique ownership concept, the team returned to full speed in just a month, and they found fewer and fewer tests to write for null values and debugging problems.

Engineers are also impressed by Rust's compiler. They said the compiler could find security vulnerabilities in another project, while Go's compiler failed to do so. They concluded that more teams should consider using Rust in their future work, which may be more suitable for Kubernetes development than Go.

A new programming language

Not long ago, inspired by Rust, Microsoft began to investigate the creation of its own programming language. One of the leaders of the project is the main maintainer of C#, so this programming language seems to be another version of Rust, but is more similar to the C-class programming language in syntax.

This language is called "Project Verona" and is dedicated to solving memory vulnerabilities in system programming. Some people speculate that ProjectVerona may be used in many of Microsoft's major products, such as Windows, Xbox and Azure.

However, Microsoft still did not actually apply ProjectVerona in the end. Microsoft does claim that the language is "fully memory secure", but still chooses to use Rust. Rust already has a well-established community and is supported by companies such as Mozilla and Intel. With the cooperation of these enterprises, Rust will grow into a more powerful language more quickly.

With the support of large enterprises and the continuous development of the community, the future of Rust is unlimited. In the coming months, it's not surprising that Microsoft plans to incorporate Rust into the enterprise in different ways. Rust has also been well optimized for microcontrollers and Internet of things devices, and companies in these areas are expected to put Rust into use. It can be said that the future of Rust is bright.

At this point, I believe you have a deeper understanding of "how Microsoft uses Rust". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report