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.
There were a surprising number of breaking changes this week. The libextra
dissolution continues. Condition
removal and the IO error overhaul also landed. rustpkg
was also removed, and
rustc's CLI interface has changed. Additionally, Rust gained another
full-time developer! A big hello to Nick Cameron, I look forward to seeing his
work.
It was also discovered that we closed the second largest number of issues of any repository on GitHub! We trailed behind homebrew, which is almost cheating, because they use it to track issues on over five thousand packages. Good job everyone!
What's cooking on master?
72 pull requests were merged this week.
Breaking Changes
- Some intrinsics have been
moved into
std::mem
, in preparations of the intrinsics no longer being publically exposed. - A soundness regression has been fixed.
char
now has range asserts. This may cause invalid uses ofchar
(using invalid values) to break.- The various traits in
std::fmt
now use&self
, rather than a separate parameter with an argument of type&Self
. @self
and@Trait
(managed trait objects) have been removed.rustpkg
has been removed.std::fmt::Default
has been renamed toShow
.- IO errors have been completely
overhauled, and no longer use
conditions. Alex wrote an
email
to the mailing list summarizing the changes. Especially take note of the
if_ok!
macro. - Conditions have been removed entirely. A detailed post-mortem is available on the pull request.
rustc
has seen some work on its interface. The output flags have been unified, replacing-c
,--emit-llvm
,-S
,--dylib
,--rlib
, etc with two arguments:--emit
and--crate-type
. There is another PR in the queue that replaces a bunch of miscellaneous flags behind-C
. It will likely land shortly, and is something to be aware of.NonCopyable
has been renamed toNoPod
to be consistent with the rest of the "marker types".reserve
naming has been shuffled around slightly.reserve
becomesreserve_exact
andreserve_at_least
becomesreserve
.SendStr
has been removed in favor of aMaybeOwned
type.
As part of the libextra dissolution, the following crates have been introduced:
libcollections
, which has inheritedBitv
,BTree
,Deque
,DList
,List
,LruCache
,PriorityQueue
,RingBuf
,SmallIntMap
,TreeMap
, andTreeSet
.libgetopts
, which has inheritedextra::getopts
. Additionally,getopts::groups
is now the only interface. It has been moved up a level, into justgetopts
, and the old functions have been removed.libserialize
, which has inheritedextra::serialize
andextra::ebml
.libuuid
, which has inheritedextra::uuid
.libsemver
, which has inheritedextra::semver
.libterm
, which has inheritedextra::term
andextra::terminfo
.
All crates are still documented, and there is a list with links at http://static.rust-lang.org/doc/master/index.html.
Other Changes
- A
black_box
function has been added toextra::test
, and theiter
method on BenchHarness can now return values. As documented (generated version), these exist to make sure that LLVM will not optimize out benchmarks. - A
fourcc!
syntax extension has been added. - A
unimplemented!
macro has been added, used much the same asunreachable!()
. - The [runtime libraries have gained examples, and libgreen now has an explanation of how it is structured at a high level, specifically where concurrency and parallelism come from.
- A
from_utf8_lossy
function has been added that replaces invalid codepoints with the unicode replacement character (�). - Network streams are now
cloneable. This allows for
multiple tasks reading/writing a
TcpStream
. - A copy-on-write Arc container has been added to
libextra, though it's now in
libcontainers
. - SIMD types are now allowed in generics.
- A new mutex type that plays well with the various runtimes has been implemented. It is in the same ballpark as native, pthread mutexes.
New Contributors
- Arcterus
- Cole Mickens
- Colin Sherratt
- HeroesGrave
- Ivan Enderlin
- James Deng
- João Souls
- Marek Šuppa
- Q.P.Liu
- Yuri Kunde Schlesner
Weekly Meeting
The weekly
meeting
discussed adding a libprim
, operator overloading, and the 1.0 goals for
LLVM.
Meetups
- There will be a meetup in Paris, on February 25, from 18:30 to 23:30.
- Bay Area Rust will be meeting February 25, at 19:00 in San Francisco. David Renshaw will be talking about Cap' Proto, Steven Fackler will be talking about exportable macros, and Kevin Cantu about testing.
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 14 PRs, but there are a substantial number of very close pending PRs that add major layout features to Servo (e.g., lists markers, tables, initial pseudo-class and pseudo-element support).
Notable additions
- Bruno Abinader continued with his great DOM additions in #1634 and #1622 and #1604
- Patrick Kim fixed borders on inline boxes in
#1577 and landed
position:relative
support in #1613 - Patrick Walton further improved layout performance in #1630 and #1615
- Adrien Bustany fixed
insertBefore
in #1621 - Lars Bergstrom landed reftest stabilization fixes in #1623 - we are almost ready to gate landing commits on content and ref tests passing on Linux, once we get more fonts installed on our Linux buildbots
New contributors
- Adrien Bustany (abustany)
Meetings
In this week's meeting, we mainly discussed display list construction with respect to layering and stacking contexts.
Josh Matthews' talk on Servo at FOSDEM is available here.
Announcements, etc
- Lazily initialized statics
- Rust gains a new full-time developer, Nick Cameron.
- Handling I/O Errors
- Pure-Rust Adler32 and CRC32
- Closures and the borrow checker
- Pure-Rust LZW Compression Algorithm
- Rust by Example: Default arguments, etc
- Standalone rust app
- IDE support?
- Playing with the new Rust I/O error handling
- Another failed attempt at parser combinators
- A case for reflection in Rust
- A persistent map implementation, like in Clojure and Scala, with performance numbers.