rust语言与go语言_后Mozilla Rust:Rust语言的未来

rust语言与go语言

With Mozilla shrinking in total employees, what is going to happen with Rust?

随着Mozilla员工总数的减少,Rust将会发生什么?

Recently Mozilla announced and enacted a sizeable number of layoffs, citing the COVID-19 pandemic. Many within the Rust community at large began to worry about the future of the beloved Rust programming language.

Mozilla最近以COVID-19大流行为由宣布并实施了大量裁员计划。 整个Rust社区中的许多人开始担心心爱的Rust编程语言的未来。

There are over 5000 open issues on GitHub, the Rust-based Servo team is no more, and some of the internal Mozilla contributors to Rust have lost their jobs!

在GitHub上有超过5000个未解决的问题,基于Rust的Servo团队已不复存在,并且一些内部的Rust贡献者也失去了工作!

As with any major news, things that can affect a programmer's happiness are always going to cause a stir online. But guess what?

与任何重大新闻一样,可能影响程序员幸福的事情总是会在网上引起轰动。 但猜猜怎么了?

Rust会没事的! 🧡 (Rust is going to be okay! 🧡)

Image for post
Photo by Peter Lloyd on Unsplash
彼得·劳埃德 ( Peter Lloyd)Unsplash

And here’s why:

原因如下:

微软喜欢Rust (Microsoft Loves Rust)

This one is far from a surprise, considering how vocal Microsoft is about their relationship with Rust. Even within this very article, you will hear about Krustlet and npm, both of which are overseen by Microsoft Engineering.

考虑到微软对他们与Rust的关系有多声音,这一点不足为奇。 即使在这篇文章中,您也将听到有关Krustlet和npm的信息,它们都是由Microsoft Engineering监督的。

Microsoft is getting tired of their once favored C++ and C code:

微软已经厌倦了他们曾经喜欢的C ++和C代码:

We can’t really do much more than we already have. It’s becoming harder and harder and more and more costly to address these issues over time.

我们实际上不能做的比以前更多。 随着时间的推移,解决这些问题变得越来越困难,越来越昂贵。

They have come to a consensus that Rust is the best alternative to C and C++ currently available.

他们已经达成共识, Rust是目前可用的C和C ++的最佳替代品

While they have concerns about its interoperability with C++, they have decided to get involved with Rust and the greater Rust community in order to continue the pursuit of Rusty solutions.

尽管他们担心它与C ++的互操作性,但他们决定加入Rust和更大的Rust社区,以继续追求Rusty解决方案。

亚马逊爱Rust (Amazon Loves Rust)

Many may not even realize it, but Amazon Web Services (AWS) is not only a strong advocate for Rust, they even sponsor it. As Rust relies on portions of AWS infrastructure to support release artifacts, libraries, source code, and to host doc.rs, it makes perfect sense.

许多人甚至可能没有意识到这一点,但是Amazon Web Services(AWS)不仅是Rust的坚定倡导者,甚至赞助了它 。 由于Rust依靠AWS基础架构的某些部分来支持发行工件,库,源代码以及托管doc.rs ,因此这是很合理的

Additionally, the AWS engineering team built an open-source virtualization technology called Firecracker which is built in Rust and available on GitHub under an Apache 2.0 license. Using Rust allows them to have speed, security, scale, and efficiency, which provide a wonderful environment for microVMs.

此外,AWS工程团队还构建了一种名为Firecracker的开源虚拟化技术,该技术内置于Rust中,并根据Apache 2.0许可在GitHub上提供。 使用Rust使它们具有速度,安全性,可扩展性和效率,这为microVM提供了绝佳的环境。

Finally, AWS also has an official Rust Lambda Runtime, allowing for Serverless Rust. Microservices are a great start for aspiring Rust developers.

最后,AWS还具有正式的Rust Lambda Runtime ,允许使用无服务器Rust。 对于有抱负的Rust开发人员来说,微服务是一个很好的开始。

Google喜欢Rust (Google Loves Rust)

Did you know that Google is building an operating system called Fuschia? The mission statement says it all:

您是否知道Google正在构建名为Fuschia的操作系统? 任务说明说了一切:

Security and privacy are woven deeply into the architecture of Fuchsia. The basic building blocks of Fuchsia, the kernel primitives, are exposed to applications as object-capabilities, which means that applications running on Fuchsia have no ambient authority: applications can interact only with the objects to which they have been granted access explicitly.

安全和隐私深深地融入了紫红色的体系结构中。 Fuchsia的基本构建模块(内核原语)作为对象功能公开给应用程序,这意味着在Fuchsia上运行的应用程序没有环境权限:应用程序只能与已明确授予其访问权限的对象进行交互。

Fuschia is built from the ground up using Rust, and is also an open platform that allows code from C++, Rust, Flutter, and Web technologies to run on it.

Fuschia是使用Rust从头开始构建的 ,也是一个开放平台,允许C ++,Rust,Flutter和Web技术上的代码在其上运行。

npm喜欢Rust (npm Loves Rust)

A little over a year ago, npm was facing a dilemma: Explosive growth that was gaining steam exponentially, and CPU intensive tasks that were bogging down servers and creating performance bottlenecks.

一年多以前,npm面临一个难题:爆炸性增长正成倍增长,而CPU密集型任务却使服务器瘫痪并造成性能瓶颈。

With an open mind, the npm engineering squad had a sort of internal hackathon where they rebuilt the authentication service from scratch in both Go and Rust, alongside a full rewrite in Node.js

坦率地讲,npm工程团队有一种内部黑客马拉松 ,他们在Go和Rust中从头开始重建了身份验证服务,并在Node.js中进行了完全重写。

It only took an hour to rewrite the authorization service using Node.js, which is no surprise. Unfortunately, the performance was similar to that of the legacy implementation — also no surprise, since Node.js is fast but the npm code was already pretty optimized.

使用Node.js重写授权服务只花了一个小时,这不足为奇。 不幸的是,其性能与传统实现的性能类似-也不足为奇,因为Node.js速度很快,但是npm代码已经进行了非常优化。

The Go rewrite took two days, but the team found the lack of a dependency management solution painful (I mean they are a system for Node Package Management after all).

转到重写了两天,但小组发现缺少一个依赖管理解决方案的痛苦(我的意思是他们毕竟为节点程序包管理系统)。

With Rust, the rewrite of the service took longer than both the JavaScript version and the Go version combined, totaling about a week to get up to speed in the language and implement the program.

使用Rust,该服务的重写花费的时间比JavaScript版本和Go版本的总和还要长,总共花费了大约一周的时间,以加快语言和实施程序的速度。

In the end, the team building the Rust version was enamored. They went looking for a programming language that was:

最后,建立Rust版本的团队迷上了。 他们去寻找一种编程语言,它是:

  • Memory Safe

    记忆安全
  • Easy to compile to a standalone and easily deployable binary

    易于编译为独立且易于部署的二进制文件
  • Fast enough to consistently outperform JavaScript

    足够快以持续胜过JavaScript

And found such a language in Rust.

并在Rust中发现了这种语言。

更多公司喜欢Rust (Many More Companies Love Rust)

From Dropbox, Cloudflare, Discord, and Fastly, we have only heard great things about Rust, namely, each companies’ usage and happiness with the language for their major critical services and infrastructure.

在Dropbox,Cloudflare,Discord和Fastly中,我们只听说过Rust的很棒的事情,即每个公司对主要关键服务和基础架构的语言的使用和满意度。

Rewriting a core service in a large company is hard, and even more so when using a relatively brand new language. Rust is only about 10 years old, whereas most languages are 20, 30, or 40+ years old!

在大型公司中,重写核心服务非常困难,在使用相对全新的语言时,更是如此。 Rust大约只有10年的历史,而大多数语言都已经有20、30或40多年的历史!

The fact that these engineering teams not only rebuilt something with Rust and also came out positive shows a lot of potential for more such projects.

这些工程团队不仅用Rust重建了一些东西, 而且表现出积极的事实,表明了更多此类项目的巨大潜力。

Furthermore, those using Kubernetes can also benefit from using Rust, as there is a kubelet that allows developers to write more concise and stable Kubernetes code at the system level, using Krustlet. This essentially allows an engineer to run WebAssembly workloads on Kubernetes in code written in Rust, rather than Go, the main supported language of Kubernetes workloads.

此外, 使用Kubernetes的用户也可以从使用Rust中受益 ,因为有一个kubelet允许开发人员使用Krustlet在系统级别编写更简洁,稳定的Kubernetes代码。 从本质上讲,这允许工程师使用Rust而不是Go(Kubernetes工作负载的主要支持语言)编写的代码在Kubernetes上运行WebAssembly工作负载。

开发人员喜欢Rust (Developers Love Rust)

Image for post

As a matter of fact, Rust has been at the top of the developer survey from StackOverflow for four years in a row, citing:

事实上,Rust连续四年在StackOverflow的开发人员调查中名列前茅,理由是:

The short answer is that Rust solves pain points present in many other languages, providing a solid step forward with a limited number of downsides.

简短的答案是,Rust解决了许多其他语言中存在的痛点,这为有限的缺点方面迈出了坚实的一步。

And what about the 5000 GitHub issues for Rust that are currently open? Let’s break them down:

那么,目前有5000个关于Rust的GitHub问题呢? 让我们分解一下:

Of these 5K+ issues, a large chunk of them are actually enhancements - roughly 1800 issues. There are about 2000 bugs, but that would make up around half of all future development. And of these 2000 bugs, a hefty portion of them are duplicates or “feature not bugs” that some developer has opened to complain.

在这些5K +问题中,其中很大一部分实际上是增强功能-大约1800个问题。 大约有2000个bug,但这将构成未来所有开发的一半。 在这2000个错误中,其中很大一部分是重复的,或者是某些开发人员已经开始抱怨的“功能不是错误”。

So fret not.

不用担心。

爱锈 (You Love Rust)

How do I know this? Because you took the time to read this article — and that means a lot! This article is truthful and meant to reassure you that Rust is awesome and here to stay. Rust is a wonderful way to create memory-safe, high-performance applications and software, welcome to the future.

我怎么知道 因为您花了时间阅读这篇文章,所以意义非凡! 这篇文章是真实的,旨在向您保证Rust非常棒,并且可以继续存在。 Rust是创建内存安全的高性能应用程序和软件的绝妙方式,欢迎未来。

As of today, in August 2020, Rust is in the top 20 of the Tiobe index, with a strong chance to take over MATLAB, Objective-C, Groovy, and possibly even Ruby. Only time will tell.

截至今天,到2020年8月,Rust处于Tiobe索引的前20名中,有很大的机会接管MATLAB,Objective-C,Groovy甚至可能是Ruby。 只有时间证明一切。

Mozilla和Rust爱Rust (Mozilla and Rust Love Rust)

The Rust Lang logo

Finally, the community and organization that control Rust are dedicated to keeping the growing language alive. They have recently announced the makings of the Rust Foundation, which aims to separate Rust more from Mozilla than it already is.

最后,控制Rust的社区和组织致力于保持不断增长的语言的生命力。 他们最近宣布了Rust基金会的成立 ,该基金会旨在使Rust与Mozilla的区别更加明显。

Their statement provides a clear direction for Rust, quelling any fears I have about this awesome language:

他们的陈述为Rust提供了明确的方向,消除了我对这种出色语言的担忧:

The Rust Core Team and Mozilla are happy to announce plans to create a Rust foundation. The Rust Core Team’s goal is to have the first iteration of the foundation up and running by the end of the year.

Rust核心团队和Mozilla很高兴宣布创建Rust基础的计划。 Rust核心团队的目标是在年底之前启动并运行基础的第一个迭代。

翻译自: https://medium.com/the-innovation/post-mozilla-rust-the-future-of-the-rust-language-61a5cfb1f615

rust语言与go语言

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值