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
- Rust 2018: the home stretch.
- Microsoft announces using Rust to build some of its Azure IoT functionality.
- Learning SIMD with Rust by finding planets.
llvm-tools
, a new rustup component for binary inspection (objdump, nm, size) and profiling (profdata).- How much Rust in Firefox?
- A rusty go at channels.
- Better HTTP upgrades with hyper.
- Our Vision for wasm-bindgen.
- The Embedded WG newsletter 6.
- [podcast] Rusty Spike Podcast - episode 35. Rust 1.27, new books, Microsoft, Eclipse, converting C to Rust, the Rust 2018 preview, the Rust 2018 roadmap, and RFCs.
- [podcast] New Rustacean news – Rust 1.27. Stable SIMD, dyn trait, rustfix and the alpha release of the Rust 2018 Edition Preview.
Crate of the Week
This week's crate is datafrog, the lightweight embeddable datalog engine that powers Rust's non-lexical lifetimes (NLL). Thanks to Jules Kerssemakers 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.
- [good first issue] wasm-bindgen: Expose bindings to ALL the global JS things.
- Get started with these beginner-friendly issues.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from Rust Core
174 pull requests were merged in the last week
- did you mean to block nightlies on clippy? (a big leap forward on the way to stable clippy!)
- llvm: add DWARF for discriminated unions
- libc: simplify the stdbuild section
- allow irrefutable
let
patterns (RFC #2086) - loosened rules involving statics mentioning other statics
- obligation forest cleanup
- suggestion for 'static impl Trait return
- fix incorrect type mismatch label pointing at return type
- use literal span for concrete type suggestion
- improve the error message when
#[panic_implementation]
is missing - point to lifetime spans on lifetime errors
- add modifier keyword spans to hir::Visibility; improve unreachable-pub, private-no-mangle lint suggestions
- provide existing ref suggestions for more E0308 errors
Self
in where clauses may not be object safe- suggest correct comparison against negative literal
- lint to favor
..=
over...
range patterns; migrate to..=
throughout codebase - detect overflows of non u32 shifts
HirId
-ification, continued- optimize
places_conflict
to avoid complex vectors etc. - NLL: better move errors
- NLL: bad error message when converting anonymous lifetime to
'static
- NLL: introduce dirty list to liveness, eliminate
ins
vector - convert NLL ops to caches
- avoid needless allocations in
liveness_of_locals
- speed up compilation of large constant arrays
- implement
#[macro_export(local_inner_macros)]
- use
Ident
s in HIR and remove emulation of hygiene with gensyms - always check type_dependent_defs
- fix ICEs when using continue as an array length inside closures (inside loop conditions)
- add error for using null characters in
#[export_name]
- don't inspect the generated existential type items
- don't ICE when performing
lower_pattern_unadjusted
on aTyError
- make the public API of the
alloc
crate a subset ofstd
- new safe associated functions for
PinMut
- make custom trait object for
Future
generic - optimize sum of Durations by using custom function
- add
str::split_ascii_whitespace
Arc
: remove unused allocation fromWeak::new()
- make
BTreeMap::clone()
not allocate when cloning an empty tree - make
FileMap::
{lines
,multibyte_chars
,non_narrow_chars
} non-mutable - implement
PartialEq
between&str
andOsString
park
/park_timeout
: prohibit spurious wakeups in nextpark
- fix possibly endless loop in
ReadDir
iterator - stabilize
Iterator::flatten
- stabilize
to_bytes
andfrom_bytes
for integers - cargo: remove all 4
Rc
clones inmin_candidates
- cargo: display a one line progress of what crates are currently built
- cargo: remove redundant hashmap
- rustdoc: minify css
- crates.io:
dyn
all the things - crates.io: forbid tarballs with hard links being uploaded
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 2345: Allow panicking in constants.
- RFC 2296: Add
Option::replace
to the core library. - RFC 2344: Allow
loop
in constant evaluation. - RFC 2302: Tuple struct construction with
Self(v1, v2, ..)
. - RFC 2397: Introduce
#[do_not_recommend]
to control errors for trait impls. - Amend RFC 0430: Allow underscores between numbers in CamelCase names.
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.
RFCs
- [disposition: postpone] String reflection.
Tracking Issues & PRs
- [disposition: merge] Tracking issue for
ToOwned::clone_into
(toowned_clone_into
). - [disposition: merge] Tracking issue for
Rc::downcast
(rc_downcast
feature). - [disposition: merge] Respect -Z no-verify during LTO.
- [disposition: merge] impl Clone for
Box<CStr>
,Box<OsStr>
,Box<Path>
. - [disposition: merge] Add
#[repr(transparent)]
to some libcore types. - [disposition: close] Add
TryFrom<{integer}>
forbool
.
New RFCs
Upcoming Events
Online
- Jul 11. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- Jul 17. Rust Community Content Subteam Meeting at #rust-content on irc.mozilla.org.
- Jul 18. Rust Events Team Meeting.
- Jul 18. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
Asia
Europe
- Jul 6. Darmstadt, DE - Rhein-Main Rust Meetup.
- Jul 9. Karlsruhe, DE - Rust Meetup
- Jul 11. Zurich, CH - Actix.rs - July Meetup.
- Jul 11. Berlin, DE - OpenTechSchool - Rust Hack and Learn.
- Jul 19. Cambridge, GB - Cambridge Rust Meetup.
North America
- Jul 8. Mountain View, US - Open Table / Icebreaker: what projects are you working on.
- Jul 9. Seattle, US - Monthly Rust Meetup.
- Jul 11. Vancouver, CA - Rust Study/Hack/Hang-out night.
- Jul 12. Columbus, US - Columbus Rust Society - Monthly Meeting.
- Jul 12. Utah Valley, Utah, US - Utah Rust - Monthly Meeting.
- Jul 15. Mountain View, US - Open Table / Icebreaker: what projects are you working on.
- Jul 18. Standford, US - Rust Bay Area - [@ Stanford] Munching Macros and Facebook's Mononoke.
- Aug 17. Portland, US - RustConf 2018. Registration is now open.
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
Freedom to shoot yourself in the foot is not a rust marketing point 😉
– eugene2k on rust-users
Thanks to DPC for the suggestion!