Hello and welcome to another issue of This Week in Rust! Rust is a systems language pursuing the trifecta: safe, concurrent, and fast. This is a weekly summary of its progress and community. Want something mentioned? Send me an email! Want to get involved? We love contributions.
What's cooking on master?
55 pull requests were merged in the last week.
Breaking Changes
- Struct variants are no longer feature-gated. At the same time, struct variants no longer support visibility modifiers, for consistency with other variants. RFC.
- The
time
crate, which is widely considered to be of poor quality, has been moved out of the distribution, but can still be accessed via cargo. - The new task pool that reem announced on reddit earlier
in the week was speedily merged into the tree, replacing the
old
TaskPool
. It includes some breaking API changes. - The compiler now treats
()
not as a distinct 'unit' type but as a zero-length tuple (though the docs continue to allow that()
may be referred to as 'unit'). This may cause breakage for macros that expect()
to be a literal, whereas now it is an expression. io::Buffer
has been refactored to be object-safe, moving some methods into other traits.- The
Extendable
trait for extending a collection via anIterator
has been renamed toExtend
, and can now be used withEnumSet
andLruCache
. - The old 'once_fns' feature gate has been removed (everybody
thought it had been removed long ago). This is unrelated to the
modern
FnOnce
type.
Other Changes
- BTree implements the collection views API.
- The
#[stable]
attribute is no longer inherited by child AST elements. This is intended to reduce the risk of accidentally marking things stable. AsRefReader
andAsRefWriter
have been renamed toByRefReader
andByRefWriter
for consistency with their method names. The original types remain and are deprecated.- Performance of
RingBuf
has improved. Some subsequent reddit discussion lamented the introduction of unsafe code. - On Windows, rustc once again prefers the bundled MinGW linker over any system-installed MinGW linker in an attempt to make Rust on Windows cause the fewest surprises.
New Contributors
- Adam Szkoda
- Artem
- Barosl Lee
- Ian Connolly
- Jeff Parsons
- Josh Haberman
- Josh Stone
- Murarth
- Ricky Taylor
Approved RFC's
- RFC 369: Numerics reform. Conservatively dismantle the numeric trait hierarchy for later reconsideration. PR.
- RFC 380: Stabilize std::fmt. Primarily stabilizes the user-facing formatting syntax, while leaving the library APIs unstable. PR.
New RFC's
- RFC 457: Version attribute. Provides a mechanism for identifying which version of the language a given source corresponds to.
- RFC 458: Improve the
Send
trait. This RFC proposes extending the Send trait in some relatively small but backwards incompatible ways, to allow more safe behaviors to be exposed in Rust's type system. In particular, this involves removing the 'static bound from Send in a way that preserves thread safety. - RFC 459: Disallow type/lifetime parameter shadowing. Source of confusing bugs.
- RFC 461: Add a thread-local storage module. Another TLS design.
- RFC 462: Future-proof
box
and&
patterns. Futureproof box patterns by renaming them to deref. In an effort to consolidate box and & patterns, change the latter to use the deref syntax as well, in recognition of them being semantically equivalent to box patterns. Make the newly introduced deref keyword a non-strict keyword. - RFC 463: Restrict identifiers after literals. Futureproofing.
- RFC 464: Rename uint/int. Latest in a series of RFC's to discourage use of pointer-sized integers as the 'default' type.
Community
From the Team
- Weekly-meetings/2014-11-11: fott; std::fmt; default typarams; rfc authors; 'coerce' vs. 'view', etc.; precent of + in type grammar; jemalloc. Reddit.
- Brian Koropoff (unwound) is a friend of the tree!
- Allocators in Rust: Niko attempts to lay out the tradeoffs involved in integrating jemalloc with Rust. Reddit. HN.
Blog Posts
- Two hours after Rust. Reports from a new Rust user. Reddit.
- Rust Serialization part 2.1: now with more benchmarks: Cap'n Proto, MessagePack, and Protobuf. Reddit.
- Serialization part 2.2: Everything's faster (especially capn proto). Reddit.
- Go vs. Rust: Productivity vs. Performance. Reddit.
Discussions
- Closures vs. Unboxed Closures. Useful explanation for the uninitiated.
- Where is artithmetic (signed) right-shift. (A:
>>
is either arithmetic or logical based on type). Foo::new()
vs.Foo()
, both on discuss and Reddit.- "Hello, world" on a PSP via Rust!. Another supreme hack from Luqman. Nice use of target specs.
- Does Rust have anything like C# async await. Take 20.
std::sync::Future
is almost useless for async processing. (Future
is ancient and unloved).- Single-source GPU support. An inquiry about the prospects of compiling Rust to GPUs.
- Experienced users: how easy is Rust's memory management system to use?. Mostly gushing about how awsome Rust is (seconded!).
- Pre RFC: Remove
FromError
trait, addFrom
trait
New Projects
- rust-id3 and rust-metaflac. Reading and writing audio file metadata.
- rust-resistant-taskpool. A load-balancing task pool.
- Rust-Welder. Experiments with error interop. Second discussion.
- json_macros. Create JSON via Rust syntax.
- rust-bitfield. A macro to generate bitfields.
- rust-smtp. SMTP client.
- yaglw. Yet another high-level OpenGL wrapper.
- rustup.ps1. A rustup.sh equivalent for Windows, installs Cargo alongside Rust, which the Rust installer currently fails to do.
Project Updates
- This Week in Servo 11.
- Piston has seen some refactoring to how it handles event loops and windows.