Rust 0.10 发布,Mozilla 新的编程语言

开发 前端
Mozilla 目前正在开发一个新的编程语言,名为“Rust”,由web语言的领军人物Brendan Eich(js之父),Dave Herman以及Mozilla公司的Graydon Hoare 合力开发。

Rust 0.10 发布,此版本被认为是 ALPHA 版本,所以大家谨慎使用。此版本分离了 libextra 库;引入了 cross-crate 语法扩展和宏;改进了 Deref trait 指针;改进了编译器外的 I/O 错误处理。此版本看似引入了新 RFC 进程,但是同时也支持二进制安装。更多内容请看发行说明

源码下载:

  1. * http://static.rust-lang.org/dist/rust-0.10.tar.gz  
  2.   http://static.rust-lang.org/dist/rust-0.10.tar.gz.asc  
  3.   SHA256 (of .tar.gz):  
  4.   c72cfbbf03016804a81d7b68e8258ffaf018f8f5a25550ad64571ce6c2642cf9  
  5.  
  6. Windows installer  
  7.  
  8. * http://static.rust-lang.org/dist/rust-0.10-install.exe  
  9.   http://static.rust-lang.org/dist/rust-0.10-install.exe.asc  
  10.   SHA256 (of .exe):  
  11.   ee7ea67845f5dd3b545b225135cca21fa5786baef4ab03f9f996f2e72bf40c6e  
  12.  
  13. Linux binary tarballs  
  14.  
  15. * http://static.rust-lang.org/dist/rust-0.10-x86_64-unknown-linux-gnu.tar.gz  
  16.   http://static.rust-lang.org/dist/rust-0.10-x86_64-unknown-linux-gnu.tar.gz.asc  
  17.   SHA256 (of .tar.gz):  
  18.   e5d6d490beee3c8f2d284f62e730193a92080d4cdf46bf972a8ddbec5bc16045  
  19.  
  20. * http://static.rust-lang.org/dist/rust-0.10-i686-unknown-linux-gnu.tar.gz  
  21.   http://static.rust-lang.org/dist/rust-0.10-i686-unknown-linux-gnu.tar.gz.asc  
  22.   SHA256 (of .tar.gz):  
  23.   7e17912b23dc790ca8ff3272500beba41afc9a1cd923bbf7a606e7d21d3ea89a  
  24.  
  25. Mac OS X binary installers  
  26.  
  27. * http://static.rust-lang.org/dist/rust-0.10-x86_64-apple-darwin.pkg  
  28.   http://static.rust-lang.org/dist/rust-0.10-x86_64-apple-darwin.pkg.asc  
  29.   SHA256 (of .pkg):  
  30.   332253023b8f641b6d0b21289a1542521d83d1e77c6aa4d1a9b94c2927769407  
  31.  
  32. * http://static.rust-lang.org/dist/rust-0.10-i686-apple-darwin.pkg  
  33.   http://static.rust-lang.org/dist/rust-0.10-i686-apple-darwin.pkg.asc  
  34.   SHA256 (of .pkg):  
  35.   26b5630083afd2286526128158e9d83fb9d4b7d965d9d89e6c6cf536105ed756  
  36.  
  37. Mac OS X binary tarballs  
  38.  
  39. * http://static.rust-lang.org/dist/rust-0.10-x86_64-apple-darwin.tar.gz  
  40.   http://static.rust-lang.org/dist/rust-0.10-x86_64-apple-darwin.tar.gz.asc  
  41.   SHA256 (of .tar.gz):  
  42.   ad0ad37886a43f0817f8115ae4e5daf17912fc31d258ebf79a73647bcc5f4eb8  
  43.  
  44. * http://static.rust-lang.org/dist/rust-0.10-i686-apple-darwin.tar.gz  
  45.   http://static.rust-lang.org/dist/rust-0.10-i686-apple-darwin.tar.gz.asc  
  46.   SHA256 (of .tar.gz):  
  47.   96c51f784e0f5c13d02c1fa4f4ad35936c0396afd8e2217b07f9708be08e06bb 

Mozilla 目前正在开发一个新的编程语言,名为“Rust”,由web语言的领军人物Brendan Eich(js之父),Dave Herman以及Mozilla公司的Graydon Hoare 合力开发。

创建这个新语言的目的是为了解决一个很顽疾的问题:软件的演进速度大大低于硬件的演进,软件在语言级别上无法真正利用多核计算带来的性能提升。Rust是针对多核体系提出的语言,并且吸收一些其他动态语言的重要特性,比如不需要管理内存,比如不会出现Null指针等等。

Rust 最早是在今年7月的Mozilla的社区峰会上公之于众的,当时就有人问以后是否会用Rust重写Firefox,Brenda说希望如此。Rust目前还处于初期的开发阶段,开发团队目前并不想花太多的时间在语法上,不过他们还是提供了一小段代码:

  1. iter pairs() -> tup(int,int) {  
  2.  
  3.  let int i = 0;  
  4.  
  5.  let int j = 0;  
  6.  
  7.   while (i < 10) {  
  8.  
  9.     put tup(i, j);  
  10.  
  11.     i += 1;  
  12.  
  13.     j += i;  
  14.  
  15.   }  
  16.  
  17. }  
  18.  
  19. fn main() {  
  20.  
  21.   let int i = 10;  
  22.  
  23.   let int j = 0;  
  24.  
  25.   for each (tup(int,int) p in pairs()) {  
  26.  
  27.       log p._0;  
  28.  
  29.       log p._1;  
  30.  
  31.       check (p._0 + 10 == i);  
  32.  
  33.       i += 1;  
  34.  
  35.       j = p._1;  
  36.  
  37.     }  
  38.  
  39.   check(j == 45);  
  40.  
  41. }  

原文链接:http://www.oschina.net/news/50408/rust-0-10-released

【编辑推荐】

  1. Mozilla的asm.js:利用JavaScript改进Web性能
  2. 开门迎新客:IBM花10亿美元收购安全厂商Trusteer
  3. Mozilla试图重新发明浏览器
  4. Mozilla首席技术官Eich:非开源浏览器不可信!
  5. Mozilla Firefox 26.0 Beta 10 发布

 

责任编辑:林师授 来源: 中国开源社区
相关推荐

2021-03-23 14:50:16

编程语言Rust漏洞

2022-04-26 09:23:07

Hare编程语言C

2022-03-02 09:49:14

Rust编程语言

2023-07-01 19:58:33

Rust

2024-03-01 20:16:03

GoRust语言

2023-12-15 14:38:00

GoRust编程语言

2020-09-01 07:50:21

Rust 编程语言

2010-01-22 11:10:21

MozillaFirefox 3.6

2011-03-22 09:28:23

Firefox 4发布Mozilla

2015-08-21 09:46:44

GitHub编程语言

2012-10-08 09:34:49

MozillaFirefoxWindows 8

2018-12-29 09:45:28

Linux编程语言命令

2021-05-17 10:35:22

编程技能开发

2023-03-08 08:28:12

编程语言项目Rust

2009-05-13 15:38:45

微软并行语言Axum

2013-10-30 13:30:29

2012-09-29 10:24:14

Firefox OS

2013-11-20 15:20:41

FirefoxFirefox 26

2012-05-17 09:43:42

Mozilla开源

2010-01-06 09:39:44

Mozilla FirFirefox
点赞
收藏

51CTO技术栈公众号