Hello and welcome to another issue of This Week in Rust! Rust is a systems language pursuing the trifecta: safety, concurrency, and speed. This is a weekly summary of its progress and community. Want something mentioned? Tweet us at @ThisWeekInRust or send us a pull request. Want to get involved? We love contributions.
This Week in Rust is openly developed on GitHub. If you find any errors in this week's issue, please submit a PR.
Updates from Rust Community
News & Blog Posts
- impl Future for Rust. Announcing the Rust "Impl period"!
- Josh Triplett joins the Cargo team.
- Discover the world of microcontrollers through Rust.
- Rust By Example has been ported to mdBook.
- Rust is one of the most energy efficient languages.
- This week in Rust docs 73.
- [podcast] New Rustacean - crates you should know: Rayon. Safe, threaded, parallel code in Rust!
Crate of the Week
This week's crate is rug, a crate providing arbitrary-precision integers, rationals and floating-point numbers, using GMP, MPFR and MPC. Thank you, Trevor Spiteri for the suggestion!
Submit your suggestions and votes for next week!
Call for Participation
Always wanted to contribute to open-source projects but didn't know where to start? Every week we highlight some tasks from the Rust community for you to pick and get started!
Some of these tasks may also have mentors available, visit the task page for more information.
- Findwork: Find something Rusty to work on. An entry point to a number of open issues across the Rust project.
- Help us libz blitz this impl period!
- Libz blitz: Out-of-band crate evaluation for 2017-10-09: semver.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from Rust Core
160 pull requests were merged in the last week
- accept underscores in unicode escapes
- evaluate fixed-length array length expressions lazily
- remove overzealous Box
optimization - fix end region emission order
- fix regression in promotion of rvalues referencing a static
- fix "new trace_macros doesn't work if there's an error during expansion"
- remove
HirId
from queries - remove
Session::dep_graph
- get
allow(unused_mut)
to work onlet
bindings - Fix mispositioned error indicators
- run the miri test suite on the aux builder and travis (will make future type system work easier)
- autodetect the type of allocator crate used
- preallocate when building the dep graph (good memory savings)
- remove rustc_bitflags; use the bitflags crate
- specialize
<FlatMap as Iterator>::fold
(great speedup) Ipv4Addr
andIpv6Addr
convenience constructors- add
_.or_default()
toEntry
APIs - additional traits for
std::mem::ManuallyDrop
- implement
<Rc<Any>>::downcast
- implement
Arc
/Rc
raw pointer conversions for?Sized
impl Hasher for
{&mut Hasher
,Box<Hasher>
}- remove
Borrow
bound fromSliceExt::binary_search
- implement unsafe pointer methods
- individualize feature gates for
const fn
invocation - remove deprecated lang items
- stabilize
iterator_for_each
- stabilize
drop_types_in_const
- stabilize
tcpstream_connect_timeout
- stabilize
compiler_fences
- stabilize
ord_max_min
- rustdoc: Compile fail stable
- cargo: Infer targets from subdirectories
- crates.io sends an email to a user to confirm their email address
New Contributors
- 42triangles
- David Adler
- Gauri Kholkar
- Ixrec
- J. Cliff Dyer
- Michal Budzynski
- rwakulszowa
- smt923
- Trevor Merrifield
Approved RFCs
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation this week:
- RFC 2052: Evolving Rust through Epochs.
- RFC 2000: Const generics.
- RFC 1977: Introduce a public/private distinction to crate dependencies.
- RFC 2126: Clarify and streamline paths and visibility.
- RFC 2071: Named existentials and impl Trait variable declarations.
- RFC 1826: Change the default URL of doc.rust-lang.org.
- RFC 2103: Attributes for tools, 2.0.
- RFC 2113:
dyn Trait
syntax for trait objects: Take 2.
Final Comment Period
Every week the team announces the 'final comment period' for RFCs and key PRs which are reaching a decision. Express your opinions now. This week's FCPs are:
- [disposition: merge] Non-lexical lifetimes.
- [disposition: merge] Fallible collection allocation 1.0.
- [disposition: merge] Implicit caller location (third try to the unwrap/expect line info problem).
- [disposition: merge]
cfg!(target_feature)
and#[target_feature]
. - [disposition: merge] Make the
assert!
macro generic to all expressions, and extend the readability of debug dumps. - [disposition: merge] Add external doc attribute to rustc.
- [disposition: merge] Unsized rvalues.
- [disposition: merge] Support defining C-compatible variadic functions in Rust.
- [disposition: merge] Add support to Cargo for alternative registries.
- [disposition: postpone]
'fn
lifetime ascription. Add a'fn
lifetime that is bound to the scope of the body of the current innermost function or closure. - [disposition: postpone] Tuple-based variadic generics.
- [disposition: postpone] Default struct field values.
- [disposition: postpone] Infer function signatures from trait declaration into 'impl's.
- [disposition: postpone] Introduce
Option::<&T>::borrowed
.
New RFCs
- Raw identifiers. Add a raw identifier format
r#ident
, so crates written in future language epochs/versions can still use an older API that overlaps with new keywords. - new
rand_core
crate,rand
adaptations. - Debuginfo-based panic locations.
Upcoming Events
- Sep 21. Rust release triage.
- Sep 23: Rust Hungary Kickoff.
- Sep 24. Rust Indonesia - Level up Your Knowledge on Rust.
- Sep 25. Rust Paris Meetup #38.
- Sep 25. Rust Durham, NC - Becoming a Contributor / Chris Krycho.
- Sep 27. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- Sep 27. Rust Documentation Team Meeting at #rust-docs on irc.mozilla.org.
- Sep 28. Mozilla Community Dresden - Rust Meetup.
- Sep 30 - Oct 1. RustFest Zürich.
- Sep 30. Rust Mexico #8: Taller Introductorio a Rust y Rocket.
- Oct 2 - Oct 3. Impl Days at RustFest Zürich.
- Oct 4. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- Oct 4. Rust Atlanta - Grab a beer with fellow Rustaceans.
- Oct 4. Rust Documentation Team Meeting at #rust-docs on irc.mozilla.org.
- Oct 4. OpenTechSchool Berlin - Rust Hack and Learn.
- Oct 5. Rust release triage.
If you are running a Rust event please add it to the calendar to get it mentioned here. Email the Rust Community Team for access.
Rust Jobs
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
<heycam> one of the best parts about stylo has been how much easier it has been to implement these style system optimizations that we need, because Rust <heycam> can you imagine if we needed to implement this all in C++ in the timeframe we have <bholley> heycam: yeah srsly <bholley> heycam: it's so rare that we get fuzz bugs in rust code <bholley> heycam: considering all the complex stuff we're doing * heycam remembers getting a bunch of fuzzer bugs from all kinds of style system stuff in gecko <bholley> heycam: think about how much time we could save if each one of those annoying compiler errors today was swapped for a fuzz bug tomorrow :-) <njn> you guys sound like an ad for Rust
— Conversation between some long-time Firefox developers.
Thanks to Josh Matthews for the suggestion.