Hello and welcome to another multi-week 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.
This week's edition was edited by: Vikrant and llogiq.
Updates from Rust Community
News & Blog Posts
- Announcing Rust 1.8.
- Writing an OS in Rust: Kernel heap. Part of the series Writing an OS in Rust.
- Learn you a Rust III - Lifetimes 101. Part of the series Learn you a Rust for great good!.
- PoC: using LLVM’s profile guided optimization in Rust.
- From &str to Cow.
- The basics of Rust structs.
- Rust community == Awesome!. How the Rust community wins despite its small size and incomplete ecosystem.
- This week in Rust docs 1.
- This week in Servo 59 and This week in Servo 60.
- This week in Ruma 2016-04-17. Ruma is a Matrix client-server API written in Rust.
Notable New Crates & Project Updates
- Reminder: Rust Belt Rust Conference CFP is open until April 30!
- rustc/cargo can now be installed on ARM Linux, NetBSD and FreeBSD using rustup/multirust.
- Announcing cargo-apk.
- Leaf now has a book that teaches you how you can build machine learning applications.
- nix. Rust friendly bindings to *nix APIs.
- winapi-kmd. Windows Kernel-Mode Drivers written in Rust.
- rust-musl-builder. Docker container for easily building static Rust binaries.
- rustw. A web frontend for the Rust compiler.
- Cake. A simple, Rustic build tool.
- metacollect. A lint to collect some crate metadata.
- Anima Engine. The quirky game engine.
- Tera. A template engine in Rust.
- rgo. A Go compiler toolchain, written in Rust.
- specs. A rusty parallel ECS with breaking performance (ecs_bench)
- Epaste. Tool to encrypt data and encode it as base64, so that it could be pasted on pastebin.
Crate of the Week
This week's Crate of the Week is owning_ref, which contains a reference type that can carry its owner with it. Thanks to Diwic 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: Add error explanations for all error codes.
- [easy] servo/saltfs: buildbot steps need description and descriptionDone.
- [easy] rust: rustbuild: Add a tidy check to ensure Cargo.lock updates are checked in.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from Rust Core
186 pull requests were merged in the last two weeks.
Notable changes
pub(restricted)
(RFC 1422) implemented- Warn on type parameter defaults, this will become an error in the future
- RFC #1494 (amendment to #550) implemented, allows blocks to follow types/paths in macro patterns
de-
/encode()
methods no longer break Serialization deriving- Macro hygiene bugs fixed
- Avoid crashing due to duplicate external items
- Fix multiple glob import
- MIR debuginfo mostly works (etc.)
- MIR Blocks no longer require END_BLOCK
- MIR now has LLVM-agnostic type layout
- Register duplicate item symbols anyway
- Resolve compiler performance regression fixed
- Syntax: Import prefixes are now paths
- Don't report errors in constants at every use site
- Handle over-aligned realloc failures on UNIX
- String::truncate goes to greater lengths to not panic
BinaryHeap::append(..)
- Faster
is_char_boundary()
with bit twiddling - Fixed
BufRead
overrun onTake
Default
forRwLock
,Mutex
,CondVar
,CStr
,Path
- Cargo can now use multiple git user names
- Removed the (apparently broken)
std::net::IPV6_V6ONLY
feature - Handle
DefId
s and extern crates before lowering the AST to HIR - Compiletest now uses JSON output
VecDeque::contains(_)
andLinkedList::contains(_)
implemented- Rust now bootstraps from previous stable instead of snapshots
impl From<Vec<T>>
andInto<Vec<T>>
forVecDeque<T>
BTree::append(_)
implemented
New Contributors
- Alec S
- Andrey Tonkih
- c4rlo
- David Hewitt
- David Tolnay
- Deepak Kannan
- Gigih Aji Ibrahim
- jocki84
- Jonathan Turner
- Kaiyin Zhong
- Lukas Kalbertodt
- Lukas Pustina
- Maxim Samburskiy
- Raph Levien
- rkjnsn
- Sander Maijers
- Szabolcs Berecz
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 1543: Add more integer atomic types.
- RFC 1510: Add a new crate-type, cdylib.
- RFC 1535: Stabilize the
-C overflow-checks
command line argument. - RFC 1440: Allow Drop types in statics/const functions.
- RFC 1399: Add
#[repr(pack = "N")]
. - Amend RFC 1228 with operator fixity and precedence.
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
#[repr(align = "N")]
. - Proposal for thread affinity.
- Specifying that
<T as Clone>::clone(&t)
whereT: Copy
should be equivalent toptr::read(&t)
. - Add workspaces to Cargo.
- Add
TryFrom
andTryInto
traits. as_millis
function onstd::time::Duration
.
New RFCs
FusedIterator
marker trait anditer::Fuse
specialization.- Add
parse_generics!
andparse_where!
macros. - Macros by example 2.0. A replacement for
macro_rules!
. - Define a best practices procedure for making bug fixes in the compiler.
- Add a
lifetime
specifier tomacro_rules!
.
Upcoming Events
- 4/26. Rust Bay Area: Securing OSes and Apps with Rust, seL4, and SGX.
- 4/27. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- 5/4. OpenTechSchool Berlin: Rust Hack and Learn.
- 5/9. Seattle Rust Meetup.
- 5/13. Rust Meetup Darmstadt.
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 and postdoc positions at MPI-SWS.
- Software Engineer at Coturnix.
- Senior full stack developer at OneSignal.
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Cow is still criminally underused in a lot of code bases
I suggest we make a new slogan to remedy this: "To err is human, to moo bovine." (I may or may not have shamelessly stolen this from this bug report)
Thanks to killercup for the suggestion.