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
AtomicFlagtype has been removed. std::vechas been renamed tostd::slice, and the oldstd::vec_ngmoved into its place.- A
Sharebuilt-in trait has been added. It also adds anUnsafe<T>type, which is now the only "safe" way of achieving internal mutability (what theCelltypes etc do). ThisSharetrait means that the type is thread-safe. See the pull request for more details. In particular, taking the address of a static who contains anUnsafemember is not allowed. std::cast::transmute_immut_unsafehas been removed because it is expressible by safe code.libnativeis 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 andAtomicU64has been removed, because not all targets support it. - The
push_bytesandread_bytesmethods onReaderandWriterhave been renamed for clarity. RefCell::withandRefCell::with_muthave been removed, because the Deref changes make them unnecessary.- The
getmethods onRefandRefMut(helpers returned byRefCell) have been removed, because the Deref changes make them unnecessary. - The
Freezetrait has been removed std::managedhas been removed from the public API.HashMapnow correctly usesTotalEq.- The
to_owned_vecmethod onIteratorhas been removed. - The
equalsmethod 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.
Vecis 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 mutare now allowed. - Some
@has been removed from rustc, yielding an 11k line patch. biginthas 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::Tmgetopts- Endian conversion in
std::mem std::sync::atomicsstd::vec_ngstd::optionterm
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 structandabstract enum - Unsurprising module imports
Iterabletrait 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