翻译进度
4
分块数量
2
参与人数

Rust 基础信息:什么是 Rust?

这是一篇协同翻译的文章,你可以点击『我来翻译』按钮来参与翻译。


针对初学者和专业人员的Rust编程语言文档,Rust从设计之初遍是为了更好的内存安全,现在已可作为生产力语言。

Rust是一门系统级编程语言,开始由Graydon Hoare开发. 后来Mozilla 实验室接管了此项目

应用级编程语言 v/s 系统级编程语言

像Java/C#的应用级编程语言被用来构建直接服务于用户的应用程序. 比如我们常用的Excel, World应用程序,网站和手机App。

像C/C++这类的属于系统级编程语言,常用来构建软件和软件平台,操作系统,游戏引擎, 编译器,等等 。通常会需要一些偏底层的操作,比如大量的和硬件交互。

系统级比应用级有两个主要的问题

  • 编写内存安全的代码很困难。
  • 编写多线程代码很困难。
vms_g 翻译于 1周前

What is Rust?

  • Rust is a system programming language developed by a Mozilla employee "Graydon Hoare" in 2006. He described this language as a "safe, concurrent and practical language" that supports the functional and imperative paradigm.
  • The syntax of rust is similar to the C++ language.
  • Rust is free and open source software, i.e., anyone can use the software freely, and the source code is openly shared so that the people can also improve the design of the software.
  • Rust is declared as one of the "most loved programming language" in the stack overflow developer survey in 2016, 2017 and 2018.
  • There is no direct memory management like calloc or malloc. It means, the memory is managed internally by Rust.

Why Rust?

Rust focuses on three goals −

  • Safety
  • Speed
  • Concurrency

The language was designed for developing highly reliable and fast software in a simple way. Rust can be used to write high-level programs down to hardware-specific programs.

Performance

Rust programming language does not have a Garbage Collector (GC) by design. This improves the performance at runtime.

Memory safety at compile time

Software built using Rust is safe from memory issues like dangling pointers, buffer overruns and memory leaks.

Multi-threaded applications

Rust’s ownership and memory safety rules provide concurrency without data races.

Support for Web Assembly (WASM)

Web Assembly helps to execute high computation intensive algorithms in the browser, on embedded devices, or anywhere else. It runs at the speed of native code. Rust can be compiled to Web Assembly for fast, reliable execution.

Rust is for

Rust language is ideal for many people for many reasons.

Let's look:

  • Team of developers: Rust proves to be quite useful for the "team of developers". Low- level programming code contains bugs which need extensive testing by the testers. However, in case of Rust, compiler refuses to compile the code if the program contains bugs. By working parallel to the compiler, the developer can focus on the program's logic rather than focusing on the bugs.
  • Students: Using Rust, many people can learn how to develop the operating system. The Rust team is trying to make the system concepts more accessible to the ordinary people, especially for those who are new to the programming.
  • Companies: Large or small companies use Rust to accomplish various tasks. These tasks include command line tools, web services, DevOps tooling, embedded devices, audio, and video analysis and transcoding, cryptocurrencies, bioinformatics, search engines, Internet of Things applications, machine learning, and even significant parts of the Firefox web browser.
  • Open source developers: Rust is an open source language means that the source code is available to the people. Therefore, they can use the source code to improve the design of Rust.

本文章首发在 LearnKu.com 网站上。
本文中的所有译文仅用于学习和交流目的,转载请务必注明文章译者、出处、和本文链接
我们的翻译工作遵照 CC 协议,如果我们的工作有侵犯到您的权益,请及时联系我们。

原文地址:

译文地址:https://learnku.com/rust/wikis/36705

讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!