打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
The Rust Programming Language
Fork me on GitHub

Rust a safe, concurrent, practical language

Rust is a curly-brace, block-structured expression language. It visually resembles the C language family, but differs significantly in syntactic and semantic details. Its design is oriented toward concerns of “programming in the large”, that is, of creating and maintaining boundaries – both abstract and operational – that preserve large-system integrity, availability and concurrency.

It supports a mixture of imperative procedural, concurrent actor, object-oriented and pure functional styles. Rust also supports generic programming and metaprogramming, in both static and dynamic styles.

A short summary of features

Type systemstatic, nominal, linear, algebraic, locally inferred
Memory safetyno null or dangling pointers, no buffer overflows
Concurrencylightweight tasks with message passing, no shared memory
Genericstype parametrization with type classes
Exception handlingunrecoverable unwinding with task isolation
Memory modeloptional task-local GC, safe pointer types with region analysis
Compilation modelahead-of-time, C/C++ compatible
Licensedual MIT / Apache 2

A very small taste of what it looks like

fn main() {
    let nums = [1, 2];
    let noms = ["Tim", "Eston", "Aaron", "Ben"];
 
    let mut odds = nums.iter().map(|&x| x * 2 - 1);
 
    for num in odds {
        do spawn {
            println!("{:s} says hello from a lightweight thread!", noms[num]);
        }
    }
}
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
The von Neumann Architecture of Computer Systems
OpenCL? and the AMD APP SDK
UPC Tutorials
Rust 的枚举
Rust中的各种指针
给python换上rust核动力
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服