编程范型 | 編譯語言、並行计算、 函数式、指令式、 物件導向、结构化 |
---|---|
設計者 | Graydon Hoare |
實作者 | Mozilla |
发行时间 | 2010年 |
当前版本 |
|
型態系統 | 靜態類型、強型別、 類型推論、結構類型 |
操作系统 | Linux、macOS、Windows FreeBSD、Android、iOS等[2] |
許可證 | Apache许可证2.0及MIT許可證[3] |
文件扩展名 | .rs、.rlib |
網站 | rust-lang.org |
啟發語言 | |
Alef[4]、C#[4]、C++[4]、Cyclone[4][5] Erlang[4]、Haskell[4]、Hermes[4]、Limbo[4] Newsqueak[4]、NIL[4]、OCaml[4]、Ruby[4] Scheme[4]、Standard ML[4]、Swift[4][6] | |
影響語言 | |
C# 7[7]、Elm[8]、Idris[9]、Swift[10]、Carbon |
Rust是由Mozilla[11]主导开发的通用、编译型编程语言。设计准则为“安全、并发、实用”[12][13],支持函数式、並行式、过程式以及面向对象的程式設計风格。
Rust語言原本是Mozilla員工Graydon Hoare的個人專案,而Mozilla於2009年開始贊助這個專案 [14],並且在2010年首次公開[15]。也在同一年,其編譯器原始碼開始由原本的OCaml語言轉移到用Rust語言,進行自我編譯工作,稱做「rustc」[16],並於2011年實際完成[17]。這個可自我編譯的編譯器在架構上採用了LLVM做為它的後端。
第一個有版本號的Rust編譯器於2012年1月釋出[18]。Rust 1.0是第一個穩定版本,於2015年5月15日釋出[19]。
Rust在完全公開的情況下開發,並且相當歡迎社区的回饋。在1.0穩定版之前,語言設計也因為透過撰寫Servo網頁瀏覽器排版引擎和rustc編譯器本身,而有進一步的改善。它雖然由Mozilla資助,但其實是一個共有專案,有很大部分的程式碼是來自於社区的貢獻者[20]。
Rust is not a particularly original language, with design elements coming from a wide range of sources. Some of these are listed below (including elements that have since been removed): SML, OCaml [...] C++ [...] ML Kit, Cyclone [...] Haskell [...] Newsqueak, Alef, Limbo [...] Erlang [...] Swift [...] Scheme [...] C# [...] Ruby [...] NIL, Hermes
Papers that have had more or less influence on Rust, or which one might want to consult for inspiration or to understand Rust's background. [...] Region based memory management in Cyclone [...] Safe memory management in Cyclone
The `if let` construct is based on the precedent set by Swift, which introduced its own `if let` statement.
Sources of Inspiration: [...] Rust
I just added the outline of a Result library that lets you use richer error messages. It's like Either except the names are more helpful. The names are inspired by Rust's Result library.
They are inspired by linear types, Uniqueness Types in the Clean programming language, and ownership types and borrowed pointers in the Rust programming language.
The Swift language is the product of tireless effort from a team of language experts, documentation gurus, compiler optimization ninjas, and an incredibly important internal dogfooding group who provided feedback to help refine and battle-test ideas. Of course, it also greatly benefited from the experiences hard-won by many other languages in the field, drawing ideas from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list.
At Mozilla Summit 2010, we launched Rust, a new programming language motivated by safety and concurrency for parallel hardware, the “manycore” future which is upon us.
After that last change fixing the logging scope context bug, looks like stage1/rustc builds. Just shy of midnight :)