首页 存档 技术 查看内容

Rust1.6发布libcore终于稳定下来

2018-3-30 13:00 |来自: 互联网 311 0

摘要: Rust是一门专注于安全、高速和并发的系统编程语言。1月21日,Rust 1.6正式发布,这是今年发布的第一个版本。 该版本有很多小的改进,一个大的特性。 libcore终于稳定下来,这是该版本最大的特性。Rust的标准库分为两 ...

Rust是一门专注于安全、高速和并发的系统编程语言。1月21日,Rust 1.6正式发布,这是今年发布的第一个版本。

该版本有很多小的改进,一个大的特性。

libcore终于稳定下来,这是该版本最大的特性。Rust的标准库分为两层:一个小的核心库libcore,与平台完全无关;构建于核心库之上的完整标准库libstd,支持内存分配、I/O和并发。如果是在嵌入式环境中,或者是编写操作系统时,往往会避免使用libstd,只用libcore。

libcore的稳定对于使用Rust编写底层软件而言迈进了很大一步。不过未来还有很多工作要做。

大约30个类库函数稳定了下来。

The drain() family of functions on collections. These methods let you move elements out of a collection while allowing them to retain their backing memory, reducing allocation in certain situations.

A number of implementations of From for converting between standard library types, mainly between various integral and floating-point types.

Finally, Vec::extend_from_slice(), which was previously known as push_all(). This method has a significantly faster implementation than the more general extend().

更多细节,可以点击“阅读原文”,查看发布说明。另外,Hacker News上有很多有价值的讨论(https://news.ycombinator.com/item?id=10948588),感兴趣的可以阅读。

本文转载自:微信公众账号 - 开发资讯,版权归原作者所有!

声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

相关分类

返回顶部