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 an email! 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
- Huon Wilson and Alexis Beingessner become Rust Team Alumni.
- The Internet on Redox. Current state of the Redox operating system. Spoiler: It's progressing fast!
- Inside the fastest font renderer in the world. font-rs, a font renderer written in Rust is an order of magnitude faster than the industry-standard FreeType.
- The Rust Platform. Aaron Turon on the concept of “Rust Platform Package”, a batteries included Rust development experience.
- Follow up on The Rust Platform by Aaron Turon.
- Hidden treasures of the Rust ecosystem.
- Structure literals vs constructors in Rust.
- for loops in Rust.
- Rust: Beyond the basics.
- References and UnsafeCell. Understanding references (
&T
and&mut T
) andUnsafeCell
. - Hello World MesssageBox example in Rust. Developing a simple GUI application for Windows.
- Another happy quickcheck customer. @llogiq on his experience with QuickCheck. QuickCheck is a way to do property based testing using randomly generated input.
New Crates & Project Updates
rustup
0.5.0 was released. This build includes a more compact syntax forrustup run
, a newrustup man
command, and bug fixes.- Zone of Control was ported to GFX.
- serde 0.8.0 released with breaking changes, bug fixes, and performance enhancements.
- Rust Books. List of Rust books.
- snap. Snappy compression implemented in Rust (including the Snappy frame format).
- shoop. Fast SCP, for the modern era.
- tock. A secure embedded operating system for Cortex-M based microcontrollers.
- coq2rust. Coq to Rust program extraction.
- OpenPGP. OpenPGP in Rust.
- This week in Rust docs 15.
- This week in Ruma 2016-07-31.
- This week in TiKV 2016-07-29.
- What's coming up in imag 12. The project also got a website, an IRC channel and a mailinglist.
Crate of the Week
This week's Crate of the Week is MaidSafe's lru_time_cache, a simple but complete least-recently-used cache implementation. Thanks gregwtmtno for the suggestion.
Submit your suggestions 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-dashboard: Fix '0 days since accident' sign. Easy bug on important piece of infrastructure that needs more contributors.
- [easy] rust-dashboard: User-defined date rang. This is an important enhancement. Requires some web experience.
- [easy] rustup: Don't capture backtraces without RUST_BACKTRACE=1. An easy fix, done in two steps, first modifying error-chain, then upgrading it in rustup.
- [easy] cargo: Warn on duplicate entry points. Simple way to get involved in one of the most important Rust projects.
- [easy] cargo: Can't specify precise crate version if there are multiple versions.
- [easy] rust: Make it easier to locate deadlocked tests. A simple enhancement to the test runner to notify the user about long-running tests.
- [easy] rustup: Add command to install shell completions.
- [easy] rustup: Clean up toolchain directories after uninstall. A simple bug with a clear fix.
- [moderate] rust: improve error message when resolution via Deref actually required DerefMut. Good first type system bug.
- [easy] imag: Switch to clap in the
imag
binary.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from Rust Core
127 pull requests were merged in the last two weeks.
- Switch to MIR-based translation by default.
- Reuse
.o
files of unchanged modules (first step towards incremental compilation) - {
vec
,binary_heap
}::Drain
is now covariant SOCK_CLOEXEC
is now used on Linux (wasn't before because bug)- TT-macro fixup
- unstable ABIs now properly feature-gated (scary change, but crater found zero regressions)
Debug
output now escapes fewer unicode codepointsimpl DoubleEndedIterator for std::env::args
- ARM personality routine is now Rust
- Keep in-transit closure types out of obligation tree
- Process
feature
flags only on configured crates - ICE on unresolved imports in patterns fixed
std::i*:checked_abs()
- ensure absense of single quotes in Windows paths
MultiSpan
has a bunch of methods back (erroneously thought to be unused and removed last week, broke clippy)intravisit::Visitor
now subsumesIdVisitor
's functionality- Only export
#[no_mangle]
externals on LTO builds - cargo now has subcommand man pages
- cargo now creates bin crates by default
(On a less serious note, the team was admonished to avoid time travel)
New Contributors
- Andrea Pretto
- Jonathan A. Kollasch
- Jonathan Creekmore
- Knight
- mcarton
- Moritz Ulrich
- Panashe M. Fundira
- Rahiel Kasim
- Robert Williamson
- Thomas Garcia
- Vladimir Vukicevic
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 1216: Promote
!
to a type. - RFC 1660: Introduce non-panicking borrow methods on
RefCell<T>
. - RFC 1653: Add
assert_ne
to complimentassert_eq
. - RFC 1504: Add support for 128-bit integers.
- RFC 1548: Add
global_asm!
for module-level inline assembly. - RFC 1560: Some internal and language-level changes to name resolution.
- Amendment to RFC 1444: Clarify behaviour when writing to a union field that implements Drop.
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:
- Add extra access methods for atomic types.
- Dedicated strike team to resolve unsafe code guidelines.
- Add a compiler flag that emits crate dependencies on a best-effort basis.
- Specify Rust compatibility of nursery crates.
- RFC process for formatting style and Rustfmt defaults.
- Define a best practices procedure for making bug fixes in the compiler.
FusedIterator
marker trait anditer::Fuse
specialization.
New RFCs
- Allow deriving
Deref
andDerefMut
. - Add a
compile_error!
macro to libstd.compile_error!
will unconditionally cause compilation to fail with the given error message when encountered. 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.
Upcoming Events
- 8/3. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- 8/3. Rust User Group Cologne/Bonn.
- 8/4. Rust release triage at #rust-triage on irc.mozilla.org.
- 8/8. Seattle Rust Meetup.
- 8/10. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- 8/10. Rust Boulder/Denver Monthly Meeting.
- 8/11. Columbus Rust Society.
- 8/12. Frankfurt/Germany Meetup.
- 8/15. Rust Paris.
If you are running a Rust event please add it to the calendar to get it mentioned here. Email Erick Tryzelaar or Brian Anderson for access.
fn work(on: RustProject) -> Money
- PhD Position: Concepts and Methods for securing the Future Energy System's Components and Plants. TLDR: the goal of the thesis is the development of a methodology for using the engineering metadata of the systems to generate models that can be used to check the communication and behaviour of the systems. A prototype of the checking tool will be implemented in Rust on ARM hardware.
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
No quote was selected for QotW.