Rust v1.9.0 发布下载,Rust是一个由Mozilla主导开发的通用、编译型编程语言。它的设计准则为“安全,并发,实用”,支持函数式,并发式,过程式以及面向对象的编程风格。Rust 的设计目标之一,是要使设计大型的互联网客户端和服务器的任务变得更容易。因此更加强调安全性、内存配置、以及并发处理等方面的特性。在性能上,具有额外安全保证的代码会比 C++ 慢一些,但是如果以 C++ 也手工提供保证的情况下,则两者性能上是相似的。
Rust是Mozilla主导开发的专注于安全、速度和并发的系统级编程语言,采用了类似浏览器的快速发布周期。Rust 1.9的最主要变化是处理错误的std::panic模块稳定了。Rust语言区分两种运行时错误:一种是预料会发生的问题,另一种是未预料的问题。预料会发生的问题通常是因为你控制之外的条件导致的,使用Result类型处理;未预料的问题是bug,因为没有预料到,使用细粒度方式处理没有意义,Rust使用panicking方法回溯发现错误的线程的栈。
更新日志
语言
- The
#[deprecated]attribute when applied to an API will generate warnings when used. The warnings may be suppressed with#[allow(deprecated)]. RFC 1270. fnitem types are zero sized, and eachfnnames a unique type. This will break code that transmutesfns, so callingtransmuteon afntype will generate a warning for a few cycles, then will be converted to an error.- Field and method resolution understand visibility, so private fields and methods cannot prevent the proper use of public fields and methods.
- The parser considers unicode codepoints in the
PATTERN_WHITE_SPACEcategory to be whitespace.
稳定的APIs
std::panicstd::panic::catch_unwind(renamed fromrecover)std::panic::resume_unwind(renamed frompropagate)std::panic::AssertUnwindSafe(renamed fromAssertRecoverSafe)std::panic::UnwindSafe(renamed fromRecoverSafe)str::is_char_boundary<*const T>::as_ref<*mut T>::as_ref<*mut T>::as_mutAsciiExt::make_ascii_uppercaseAsciiExt::make_ascii_lowercasechar::decode_utf16char::DecodeUtf16char::DecodeUtf16Errorchar::DecodeUtf16Error::unpaired_surrogateBTreeSet::takeBTreeSet::replaceBTreeSet::getHashSet::takeHashSet::replaceHashSet::getOsString::with_capacityOsString::clearOsString::capacityOsString::reserveOsString::reserve_exactOsStr::is_emptyOsStr::lenstd::os::unix::threadRawPthreadJoinHandleExtJoinHandleExt::as_pthread_tJoinHandleExt::into_pthread_tHashSet::hasherHashMap::hasherCommandExt::execFile::try_cloneSocketAddr::set_ipSocketAddr::set_portSocketAddrV4::set_ipSocketAddrV4::set_portSocketAddrV6::set_ipSocketAddrV6::set_portSocketAddrV6::set_flowinfoSocketAddrV6::set_scope_idslice::copy_from_sliceptr::read_volatileptr::write_volatileOpenOptions::create_newTcpStream::set_nodelayTcpStream::nodelayTcpStream::set_ttlTcpStream::ttlTcpStream::set_only_v6TcpStream::only_v6TcpStream::take_errorTcpStream::set_nonblockingTcpListener::set_ttlTcpListener::ttlTcpListener::set_only_v6TcpListener::only_v6TcpListener::take_errorTcpListener::set_nonblockingUdpSocket::set_broadcastUdpSocket::broadcastUdpSocket::set_multicast_loop_v4UdpSocket::multicast_loop_v4UdpSocket::set_multicast_ttl_v4UdpSocket::multicast_ttl_v4UdpSocket::set_multicast_loop_v6UdpSocket::multicast_loop_v6UdpSocket::set_multicast_ttl_v6UdpSocket::multicast_ttl_v6UdpSocket::set_ttlUdpSocket::ttlUdpSocket::set_only_v6UdpSocket::only_v6UdpSocket::join_multicast_v4UdpSocket::join_multicast_v6UdpSocket::leave_multicast_v4UdpSocket::leave_multicast_v6UdpSocket::take_errorUdpSocket::connectUdpSocket::sendUdpSocket::recvUdpSocket::set_nonblocking
库
std::sync::Onceis poisoned if its initialization function fails.cell::Refandcell::RefMutcan contain unsized types.- Most types implement
fmt::Debug. - The default buffer size used by
BufReaderandBufWriterwas reduced to 8K, from 64K. This is in line with the buffer size used by other languages. Instant,SystemTimeandDurationimplement+=and-=.Durationadditionally implements*=and/=.Skipis aDoubleEndedIterator.From<[u8; 4]>is implemented forIpv4Addr.ChainimplementsBufRead.HashMap,HashSetand iterators are covariant.
Cargo
- Cargo can now run concurrently.
- Top-level overrides allow specific revisions of crates to be overridden through the entire crate graph. This is intended to make upgrades easier for large projects, by allowing crates to be forked temporarily until they've been upgraded and republished.
- Cargo exports a
CARGO_PKG_AUTHORSenvironment variable. - Cargo will pass the contents of the
RUSTFLAGSvariable torustcon the commandline.rustcarguments can also be specified in thebuild.rustflagsconfiguration key.
性能
- The time complexity of comparing variables for equivalence during type unification is reduced from O(n!) to O(n). This leads to major compilation time improvement in some scenarios.
ToStringis specialized forstr, giving it the same performance asto_owned.- Spawning processes with
Command::outputno longer creates extra threads. #[derive(PartialEq)]and#[derive(PartialOrd)]emit less code for C-like enums.
Misc
- Passing the
--quietflag to a test runner will produce much-abbreviated output. - The Rust Project now publishes std binaries for the
mips-unknown-linux-musl,mipsel-unknown-linux-musl, andi586-pc-windows-msvctargets.
兼容说明
std::sync::Onceis poisoned if its initialization function fails.- It is illegal to define methods with the same name in overlapping inherent
implblocks. fnitem types are zero sized, and eachfnnames a unique type. This will break code that transmutesfns, so callingtransmuteon afntype will generate a warning for a few cycles, then will be converted to an error.- Improvements to const evaluation may trigger new errors when integer literals are out of range.
下载
Rust 1.8现在可以在这里下载,如果你想了解更多发行说明请点击这里。
Rust 1.8发布下载,放弃了Unix系统的Make编译系统 http://www.linuxidc.com/Linux/2016-04/130451.htm
Rust 1.2 稳定版发布下载,Mozilla 编程语言 http://www.linuxidc.com/Linux/2015-08/121290.htm
为什么我说 Rust 是靠谱的编程语言 http://www.linuxidc.com/Linux/2015-05/117711.htm
Rust 1.2带来了更快的编译速度和并行代码生成 http://www.linuxidc.com/Linux/2015-08/121830.htm
Rust 的详细介绍:请点这里
Rust 的下载地址:请点这里
本文永久更新链接地址:http://www.linuxidc.com/Linux/2016-05/131811.htm
