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.
This was a big week. rvalue lifetimes and external syntax extensions landed, as well as a bunch of codegen optimization.
What's cooking in master?
69 pull requests were merged this week. As of writing, bors has 14 approved pull requests waiting.
Breaking Changes
std::num
's ongoing overhaul continues. It's going to be drastically simplified, and not try to be a general-purpose numeric library. num-rs is intended to provide some base algebraic types. #11504 removes gamma/bessel and does some cleanup of cmath. #11548 merges Bitwise and BitCount and removes Bounded and Bitwise from the prelude. #11622 simplifies Primitive.- Destructuring
@
patterns are no longer supported. - The return type of
Chan::try_recv
has been extended to indicate why it did not return a value. That is, whether there was legitimately no value, or if the other end had hung up. - Disk-relative paths on Windows are now properly generated when joining two paths.
- FromBase64 and FromHex now use error enums.
std::io
has been shuffled around a bit.- (Almost?) all iterator types have been renamed.
- unsafe functions can no longer be coerced to closures.
- Unnecessary (useless) visibility modifiers on
use
andextern mod
are now forbidden. - Building on last week's per-task stdout/stderr, rustc's error reporting has been cleaned up significantly.
Other Changes
- Externally loadable syntax extensions have landed! We can now write syntax extensions outside of the compiler, and export macros.
- The "rvalue lifetime" issue has seen some significant work put into
it. Notably,
for x in [1, 2, 3, 4].iter() { .. }
should now work, among many other papercut annoyances with rvalues. - Error messages involving inferred integer types are now much more
sane. Rather than
<V0>
or<VI1>
, it now prints<generic integer #0>
etc. - Accidentally including a semicolon on the last line of a function now has a better error message, if the types line up.
- Some bugs with trait object coercion have been fixed.
- The runtime now has its own documentation, viewable here.
- rustdoc's search is now more forgiving on the input it accepts.
- Inserting into tries has been optimized significantly, with no unsafe code. Its iterator has also been optimized, albeit with unsafe code.
- The reference-counting headers have been removed. The associated "managed-unique" concept has also been removed.
- The recent OS X 10.9 breakage should be
fixed, as we will no longer use
ar s
on that platform.
New Contributors
- Clinton Ryan
- Derek Guenther
- Lucy
- Petter Remen
- Shamir Khodzha
- Yehuda Katz
Weekly Meeting
The weekly meeting discussed associated function resolution, changes to our calling convention (specifically the fate of the ubiquitous environment pointer), how we want to handle feature freeze, static items with destructors, and documentation on primitives.
Quotes of the Week
{% blockquote tjc on the Rust-the-game/Rust-the-language confusion %} who says you can't make money selling a compiler? You can, as long as you convince people it's a video game
{% blockquote eddyb %} who needs pure functional when you have pure cool?
This Week in Servo
Servo is a web browser engine written in Rust and is one of the primary test cases for the Rust language.
This week, we landed 22 PRs. There will be a Servo workweek in the Mozilla San Francisco office next week, Tuesday through Friday.
Notable additions
- Jack Moffitt landed the huge Rust upgrade #1473, bringing us very close to the 0.9 release. Hooray!
- Lars Bergstrom got NVidia-on-Linux working in #1487 and fixed the content test reliability in #1500.
- Tetsuharu Ohzeki implemented
removeAttribute
on Element in #1448. - jgraham landed innerHTML support #1450.
- Bruno Abinader implemented several fixes related to DOMImplementation: #1497, #1488.
- Corey Richardson fixed up an error case in startup on Linux in #1502.
- Isabelle Carter landed the initial work for handling
position:fixed
in #1440.
New Contributors
- Corey Richardson
Meetings
In this week's
meeting, we
discussed the need to clean up our test harnesses, the removal of @
in
support of the next Rust upgrade, and the workweek..
Announcements, etc
- The first pure-Rust AES implementation. According to enix in IRC, this is also the first bit slicing implementation in a high level language (ie, not assembly or a port of assembly).
- rust-re2, re2 bindings
- A 30 Minute Introduction to Rust
- ObjCrust, building an iOS static library with Rust.A
- The Periodic Table of Rust Types
- Sodium Oxide, NaCl bindings, updated to 0.9
- capnproto-rust benchmark update
- rust-phf, compile-time hash maps. It also serves as a demonstration of loadable syntax extensions!
- Rust has do-while loops, a dirty hack no one should use.
- Understanding Pointers, Ownership, and Lifetimes in Rust
- A Just-in-time Compiler (Written) In Rust
- jba, a GameBoy emulator written in Rust.