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
- My experience rewriting Enjarify in Rust. Enjarify is a tool (written in Python) for translating Dalvik bytecode to equivalent Java bytecode.
- The PlayRust Classifier. Synopsis of a RustConf talk on a classifier to detect posts that were intended for /r/playrust but were mistakenly posted on /r/rust.
- Why Rust's
std::collections
is absolutely fantastic. Follow-up to - a critique of Rust'sstd::collections
. - Using
and_then
andmap
combinators on the RustResult
Type. - GFX Programming Model. A deep dive into what makes gfx-rs complex and awesome.
- Building a scalable MySQL Proxy in Rust.
- Using unsafe tricks to examine Rust data structure layout.
- Tools for profiling Rust.
- Generating Rustdoc with a custom style.
- Understanding where clauses and trait constraints.
- Let's Build a REPL/Parser with Rust & LALRPOP.
- [video] Videos from Rust Meetup Cologne/Bonn.
RustConf Experiences
- My RustConf travelogue by Zack M. Davis.
- Rustconf 2016 – What was cool and what surprised me by Andy Grove.
- Notes from RustConf 2016 talks by Brian Pearce.
New Crates & Project Updates
- Announcing the code style RFC process and style team.
- Redox is now listed in Github's Open Source Operating Systems Showcase.
- rustcxx is a tool allowing C++ to be used from a Rust project easily. It works by allowing snippets of C++ to be included within a Rust function, and vice-versa.
- Kinder. Algebraic structure and emulation of higher kinded types for Rust.
- rdedup. Data deduplication with compression and public key encryption.
- bit_reverse. A Rust library to compute the bit reversal of primitive integers.
- This Week in Rust Docs 22.
- These days in Piston 3.
- This week in Ruru 1. Ruru lets you write native Ruby extensions in Rust.
- This week in TiKV 2016-09-19.
Crate of the Week
This week's crate of the week is (the in best TWiR-tradition shamelessly self-promoted) mysql-proxy, a flexible, lightweight and scalable proxy for MySQL databases. Thanks to andygrove 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.
- [easy] rust: Specialisation error 502 is misleading.
- [easy] rust: Bootstrap key logic is too strict.
- [easy] rust: rustc should emit an error when there's a bootstrap key mismatch.
- [easy] rust: Lint against using generic conversion traits when concrete methods are available.
- [hard] rust: Fix unwinding on emscripten.
- [moderate] rust: Create official .deb packages.
- [easy] rust-www: Better front-page example. The front page example on the website isn't so special. Make it shine.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from Rust Core
98 pull requests were merged in the last two weeks.
- Macro invocations now fold/visit in the same order (makes it easier to reason about them)
- Optimized parser's last token handling (who'd have thought it could be optimized further?)
- Some dependency graph improvements
- Rustbuild now supports python3
- LLVM updated
- Don't lose padding for constant closures and tuples (fixes #36401 segfault)
- Improved move checker accuracy and error reports
- Better error message when shadowing type with generics
- Improve Macro-1.1 errors labelling
SyntaxExtension::MacroRulesTT
is no more#[derive(Clone, Eq)]
produces less code (Yay! faster builds!)- Default stack size upped to 16MiB (temporary measure against stack overflows)
- Change in invoking drop glue for boxed dynamically-sized values (fixes LLVM assertion failure)
private_in_public
error demoted to warning (until remaining regressions are fixed, also in beta)- MIR optimization: Remove reborrows for references (and already pass dependencies seem to become subtle...)
- Better parent info for
-Z save-analysis
- Avoid loading/parsing unused modules (e.g.
#[cfg(any())] mod foo
) - Fix closure-as-trait-object dropping
Duration::checked_
{add
,sub
,mul
,div
}ty::TraitObject
's projection bounds are now stably sorted (also unifies/removes diverse hashing implementations)- De-specialized
Zip
data (some ongoing optimization work) Iterator::sum()
andproduct()
no longer check for overflow in release mode- Fix poor performance in
Vec::
{extend_from_slice
,extend_with_element
}()
std::str::replacen(..)
- Zero the first byte of
CString
s on drop likely(_)
/unlikely(_)
intrinsics added (help the CPU with branch prediction)std::io::Take::into_inner()
std::alloc::
{Rc
,Arc
}::ptr_eq(..)
compiler-rt
is dead, long livecompiler-builtins
!- dist tarball now contains version info
- sublime-rust now works with the new error format
New Contributors
- Caleb Jones
- dangcheng
- Eugene Bulkin
- knight42
- Liigo
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 1696:
mem::discriminant()
. Add a function that extracts the discriminant from an enum variant as a comparable, hashable, printable, but (for now) opaque and unorderable type.
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:
- Let a
loop { ... }
expression return a value viabreak my_value;
. - Add a compiler flag that emits crate dependencies on a best-effort basis.
- Generalize the delayed resolution of language items to arbitrary items.
New RFCs
Upcoming Events
- 9/21. Rust Boulder/Denver Monthly Meeting.
- 9/21. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- 9/21. Rust Dcoumentation Team Meeting at #rust-docs on irc.mozilla.org.
- 9/22. RustPH Mentors Meeting.
- 9/22. Rust release triage at #rust-triage on irc.mozilla.org.
- 9/26. São Paulo Meetup.
- 9/28. Boston Rust Meetup.
- 9/28. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- 9/28. Rust Dcoumentation Team Meeting at #rust-docs on irc.mozilla.org.
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.
fn work(on: RustProject) -> Money
No jobs listed for this week.
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
No quote was selected for QotW.
(Full disclosure: we removed QotW for this issue because selected QotW was deemed inappropriate and against the core values of Rust community. Here is the relevant discussion on reddit. If you are curious, you can find the quote in git history).