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 weeks flips the switch from libgreen-by-default to libnative-by-default.
What's cooking on master?
91 pull requests were merged this week, topping the previous record of 89.
Breaking Changes
- Logging has been extracted to its own
crate. Using the logging macros
(
debug!
etc) now requires a#[phase(syntax, link)] extern crate log;
. - The
AtomicFlag
type has been removed. std::vec
has been renamed tostd::slice
, and the oldstd::vec_ng
moved into its place.- A
Share
built-in trait has been added. It also adds anUnsafe<T>
type, which is now the only "safe" way of achieving internal mutability (what theCell
types etc do). ThisShare
trait means that the type is thread-safe. See the pull request for more details. In particular, taking the address of a static who contains anUnsafe
member is not allowed. std::cast::transmute_immut_unsafe
has been removed because it is expressible by safe code.libnative
is now the default runtime. In the process, the#[no_uv]
attribute was renamed to#[no_start]
.- Atomics no longer require mutable references to
change, due to the work on
Share
, they can safely use interior mutability. Additionally, the generic atomics have been hidden andAtomicU64
has been removed, because not all targets support it. - The
push_bytes
andread_bytes
methods onReader
andWriter
have been renamed for clarity. RefCell::with
andRefCell::with_mut
have been removed, because the Deref changes make them unnecessary.- The
get
methods onRef
andRefMut
(helpers returned byRefCell
) have been removed, because the Deref changes make them unnecessary. - The
Freeze
trait has been removed std::managed
has been removed from the public API.HashMap
now correctly usesTotalEq
.- The
to_owned_vec
method onIterator
has been removed. - The
equals
method has been removed fromTotalEq
, due to the recent changes inTotalEq
's semantics. - Trait implementations may no longer implement a method twice.
Other Changes
- Some bugs with cross-crate autoderef have been fixed.
- Some Windows issues with non-English locales have been fixed.
- Removing two words from a structure in libsyntax shaved 100MB off the librustc compile.
- Some well-placed indirection in librustc shaved 200MB off the librustc compile.
- Discarding some data after it's no longer useful shaved another 100MB off the librustc compile.
- The new attribute syntax has been implemented, though the old has not yet been replaced.
Vec
is now in the prelude, as well as the lint for uses of~[T]
being made allow by default.- Some false positives for crate searching have been fixed.
- A few bugs with struct ABI on x86 have been fixed.
- Mutable slices in
static mut
are now allowed. - Some
@
has been removed from rustc, yielding an 11k line patch. bigint
has seen some optimization, though not major.
The doc sprint happened last week. A bunch of pull requests for docs for this landed:
std::ops
(from the rollup)time::Tm
getopts
- Endian conversion in
std::mem
std::sync::atomics
std::vec_ng
std::option
term
New Contributors
- Eunchong Yu
- Jonathan S
- Jorge Aparicio
- Ms2ger
- Olle Jonsson
- Ryan Scheel (Havvy)
Weekly Meeting
The weekly meeting discussed using GitHub for RFCs, the docsprint, and one of the RFCs.
RFCs
Some new RFCs:
- Tweaked Variance Inference
- Another struct inheritance RFC, extending enums
- Another one,
abstract struct
andabstract enum
- Unsurprising module imports
Iterable
trait family- Attributes on match arms and statements
- SIMD Support
- Opt-in builtin traits
Project Updates
rustfind, doomlord's code browser for Rust, has been updated. This is a very nice librustc-integrated tool that supports jump-to-definition.
Relatedly, I'm reminded of unfold, doomlord's tool for displaying "brace context" of code. It includes an "rg" script, which is a simple grep for item definitions.
In leiu of a "This Week in Servo", Servo has been making progress on Acid2.
Other Announcements
- Memory Management in C Programs -- this is a very well written article from the nethack team. All the concepts discussed within apply to Rust.
- Dynamically Sized Types in Rust
- Announcing the new Rust package manager, Cargo. It's on github.
- Rust is in the next DWARF standard!
- A success story of Rust and emscripten
- A Rust meetup group in London
- Subtyping and coercion in Rust