当前位置:网站首页>Famous companies that use rust in production and their reasons for choosing rust

Famous companies that use rust in production and their reasons for choosing rust

2020-12-07 22:51:18 MikeTang

author | Gints Dreimanis
translator | Little and big
planning | Cai Fangfang
Rust Has quietly become one of the most popular programming languages . As a new underlying language ,Rust Has a memory security mechanism 、 No less than C The performance advantages of language 、 Great developer community and so on . This article also introduces those who are using Rust And the choice of these companies Rust Why .

This article was originally published in https://serokell.io/(《9 Companies That Use Rust in Production》), Authorized by the original author , from InfoQ Translate and share .

You may not know ,Rust It is one of the most promising and popular programming languages at present .

It was originally made by Mozilla establish , Was later Dropbox、 Microsoft、Facebook Etc .Rust The main advantage of , It's still in use JavaScript and Python And other languages for the development of memory security at the same time , It can be realized no less than C Performance of .

In this article , I'll introduce you to 9 Home use Rust Big companies , And explore their choices Rust Why .

9 individual Rust Successful applications
Dropbox

Dropbox Use Rust As part of its file synchronization engine . Because the file synchronization engine is highly concurrent , So write 、 Testing and debugging are difficult . therefore , The team chooses to use Rust Rewrite this part . When dealing with complex code bases and concurrency ,Rust Static typing and compile time checking make it more than Python Dynamic type languages have more advantages .

Rust It's a power multiplier for our team , Use Rust It's one of the best decisions we've made . In addition to performance , Its ergonomics and assurance of accuracy help us reduce the complexity of synchronization . We can encode the complex invariant of the system in the type system , And let the compiler check them for us .( original text )

Dropbox More about Rust Use information of .

Coursera

Coursera In their programming job function Rust, Students need to write and run a computer program to solve a problem . The program is in Docker Running in the container 、 Testing and grading . For safety reasons , The development team needs to use something like Rust Such a low-level language , They think that Rust Than C More secure .

Even though C Is the default low-level control programming language , But it has strict security and correctness requirements for binary files . We chose Rust, One comes from Mozilla The modern native language of .Rust An important feature of is its powerful type system , It's completely immune to certain types of security vulnerabilities , This makes it an excellent choice for key security functions .( original text )

You can get more about their use in programming tasks on their blogs Rust Details of .

Figma

Figma It's based on web Tools for vector design and prototyping . They choose to be in Rust( It used to be TypeScript) Rewrite their multiplayer synchronization engine to improve performance , Because their server capacity has been unable to meet the needs of the growth rate of users .

We choose to use Rust Rewrite , Because it has the best speed and low resource utilization among similar languages , It also has the security of standard server language . Low resource utilization is particularly important to us , Because some performance problems with the old server are caused by the garbage collector , and Rust There will be no such problem .( original text )

Figma More about Rust The use of articles .

npm

npm It's a JavaScript Package manager . The reason why its team of engineers chose to use Rust Rewrite their main service , It's because they realize , If users continue to grow , Server performance will soon become a bottleneck . They refuse to use things like C and C++ Technology like this , Because they think C and C++ Processes is not good web Memory management of public services .npm Don't use Java Why , Because java Need to deploy on the server JVM.

npm Only efficient and scalable solutions can solve the challenge . If a service is deployed, you don't have to care about its existence , It can save engineers valuable time in research and development , Let them focus on other issues .npm Employees also attach great importance to whether there is a technology community that can help them in a technology ecology .Rust Meet all these criteria , therefore Rust Now it is npm One of the technology stacks of .( original text )

If you want to know more , Please read Rust Case studies on the home page .

Microsoft


Microsoft Recently began to try to make Rust Integrated into its large scale C/ C++ In Code Engineering .

Microsoft use Rust The main reason for this is the memory security it provides . In the past 12 In the year , stay Microsoft Discovered CVEs( Common vulnerabilities and pitfalls ) There's about 70% It's about memory security .Microsoft Various methods have been tried to solve this problem , For example, a lot of training for developers 、 Using static analysis tools, etc . However , Finally found that the only way to solve this problem is to work on memory security , Block the road .

Cloudflare

Cloudflare It uses... In its core edge logic Rust, And treat it as memory unsafe C alternatives .

They are GitHub It's shown on 18 One use Rust Open source repository of , Recorded the use of Rust Documents for developing firewall rules , This is a flexible and customizable firewall tool .

Through the performance of 、 Memory safety 、 Low memory requirements assessment , Combining other products we are developing ( Such as Spectrum) The ability requirements of ,Rust Stand out from the crowd , It's the best option .( original text )

Facebook

Facebook Use Rust It's rewritten before Python Source code control back end . They've been looking for a compiled language to rewrite it ,Rust The safety appeal of the system is still very strong , after Rust It was used by the source code control team . Give Way Facebook use Rust Why , The main thing is that the ease of use of compiler feedback loops can help reduce bug The economic losses caused , Instead of static analysis and code review .

Rust A large number of serious errors can be detected at compile time , The cost of a bug at compile time is several orders of magnitude less than in production .

Amazon

AWS Already in Lambda、EC2 and S3 And other performance sensitive service components Rust. Besides , The company publicly supports and sponsors the development of the language and its ecosystem .

Amazon also has a full use Rust Open source services written by Firecracker VMM. It's a virtual machine monitor , The original purpose was to AWS Lambda and AWS Fargate Service built .

Discord

Discord In many of its projects Rust, Including client side and server side .

for example , By using Elixir NIFs( Native implementation functions ), The team is based on Rust and Elixir It extends the number of concurrent users to 1100 ten thousand . under these circumstances ,Rust So that they can improve their existing memory security Elixir Efficiency of code .

They are still in Rust( Turned out to be Go) Rewritten in Read state service . although Go Version of the service is fast enough in most cases , But because of Go Memory model and garbage collector defects , It sometimes has a large delay peak .

To solve this problem , Had to switch to use Rust, It provides a unique memory allocation system , No more garbage collectors .

In addition to performance ,Rust There are many advantages to the engineering team . for example , Its type security and borrow checker characteristic , When product requirements change or language functions are adjusted and upgraded , Refactoring code becomes very easy . Besides , Its ecosystem and tools are excellent , And it's in good shape .( original text )

Want to know more about it Discord Use Rust Information about , Please check out this article on their blog .

Rust The future of

Most of the companies mentioned above ,Rust It's all done C A better alternative to language , use Rust Rewrite , Can avoid performance degradation . When teams need better performance , But also want to avoid and C Related memory problems , They will choose to use Rust.

however Rust And that's more than that : It makes the underlying programming easier , Yes WASM With excellent support , And better concurrency support , There's an active technology community .

some time , As more and more companies discover Rust You can optimize your existing projects , expect Rust The amount of usage will increase more .

If you want to learn more about Rust Knowledge , You can check out the quick start on our blog .

Link to the original text :

9 Companies That Use Rust in Production

https://serokell.io/blog/rust-companies


This article is from WeChat official account. - Rust Language Chinese community (rust-china).
If there is any infringement , Please contact the support@oschina.cn Delete .
Participation of this paper “OSC Source creation plan ”, You are welcome to join us , share .

版权声明
本文为[MikeTang]所创,转载请带上原文链接,感谢
https://chowdera.com/2020/12/20201207225041509k.html