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
- Announcing Serde 1.0.0 - zero-copy deserialization and remote derive.
- rustc-serialize is deprecated in favour of Serde.
- Rust MessagePack and Serde 1.0.
- Rust container cheat sheet. Visualisation of in-memory representation of Rust types.
- A visual guide for rustfmt’s configs.
- Redox OS 0.2.0 - Celebrating 2 years of Redox.
- Gtk-rs official tutorial is released.
- Unification in Chalk, part 2. Chalk is a PROLOG-ish interpreter written in Rust, intended eventually for use in the compiler.
- Negative reasoning in Chalk.
- How to fuzz a Rust program.
- Tricking Rust into following the XDG Base Directory specification.
- This week in Rust docs 53.
- This week in Servo 99.
Crate of the Week
This week's crate of the week is pq, a crate to generically decode protobuf messages. Thanks to sevagh 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.
- What topics would you like to see covered in a video course about Rust?
- rust: Debian Rust packages.
- rdedup - a data deduplication with compression and public key encryption library, is looking for contributors who are interested in crypto, command line, and backups.
- PumpkinDB has a list of starter issues for people interested in an event sourcing database engine.
- [easy] maud: Remove
error!
macro. Maud is an HTML template engine for Rust. - [easy] maud: Document toggled classes.
- [less easy] rust-bindgen: Add in-worklist bits to the analysis runner.
- [easy] flate2: Use distinct Flush types for
Compress::compress
vsDecompress::decompress
. flate2 implements FLATE, Gzip, and Zlib bindings for Rust. - [easy] flate2: Write usage examples.
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 week.
- repr struct alignment (RFC #1358]
- syntax: support parenthesis around trait bounds
- :vis matcher for macro_rules
traits::select(..)
filters out predicates from other traits- cache DTOR check constraints on abstract data types
- performance audit Spring 2017
- remove unstable deprecated items
- don't panic if attribute macros don't resolve at crate root
- hoedown makes a comeback!
- re-enable hoedown by default
- specialize
Vec::extend(IntoIter)
- specialize {
Path
,OsStr
}.clone_into()
- add functions to transmute floats to ints
- don't clog register allocator with byvals
- back out backtrace pruning logic (it was too eager)
- convert calls to
visit_all_item_likes_in_crate(..)
- fix debug infinite loop
- on-demand-ify
associated_item_def_ids
- on-demand-ify
monomorphic_const_eval
- polymorphic
const_eval(..)
- cargo: add
overflow_checks
to profiles - cargo: CLI support for
--all-
{bins
,tests
,examples
,benches
} - cargo: support
$RUSTC_WRAPPER
New Contributors
- Dylan Maccora
- Maxwell Paul Brickner
- Nicolas Bigaouette
Approved RFCs
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation this week:
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] Deprecate anonymous parameters.
- [disposition: close] Check future-proofing of
macro_rules!
using FIRST sets. - [disposition: merge] Extend entry API to work on borrowed keys.
- [disposition: merge] Proposal for default crate recommendation ranking.
- [disposition: merge] Remove static bound from type_id.
- [disposition: merge] extend
?
to operate over other types. - [disposition: merge] Improve the
assert_eq
failure message formatting to increase legibility. - [disposition: merge] A portability lint.
- [disposition: postpone] Add
SafeDeref
andSafeDerefMut
, equivalent toDeref
andDerefMut
but which are guaranteed to always return the same object. - [disposition: postpone] Unsafe lifetime. Add a new special lifetime,
'unsafe
, that implicitly satisfies any constraint, but may only be instantiated within an unsafe context.
New RFCs
Style RFCs
Style RFCs are part of the process for deciding on style guidelines for the Rust community and defaults for Rustfmt. The process is similar to the RFC process, but we try to reach rough consensus on issues (including a final comment period) before progressing to PRs. Just like the RFC process, all users are welcome to comment and submit RFCs. If you want to help decide what Rust code should look like, come get involved!
We're making good progress and the style is coming together. If you want to see the style in practice, check out our example or use the Integer32 Playground and select 'Proposed RFC' from the 'Format' menu. Be aware that implementation is work in progress.
Issues in final comment period:
- Add text from the structs/unions RFC to the guide.
- Ordering of types of groups within a module.
- Convention about empty lines.
- Imports (
use
) - Closures
- Where clauses
Good first issues:
We're happy to mentor these, please reach out to us in #rust-style if you'd like to get involved
Upcoming Events
- Apr 27. Rust Mexico City Meetup #5.
- Apr 27. Rust Stockholm - Rust meetup @ Distil Networks.
- Apr 27. Rust Meetup Dresden.
- Apr 30. RustFest 2017 - Kyiv, Ukraine.
- Apr 30. Kickstart to Rust Mozilla Gujarat User Group.
- May 2. Rust Workshop - RustBridge - Dortmund, Germany.
- May 3. Intro to Rust for Java programmers - Code@LTH.
- May 3. OpenTechSchool Berlin - Rust Hack and Learn.
- May 3. Boston Rust: Rust 1.0 Anniversary Party and Hack Night.
- May 3. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- May 3. Rust Documentation Team Meeting at #rust-docs on irc.mozilla.org.
- May 4. Rust release triage.
- May 4. Rust Bay Area: Using Rust at Dropbox to make Magic Pocket.
- May 8. Prague Rust Meetup #3.
- May 8. Seattle Rust - Monthly Meetup.
- May 10. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- May 10. Rust Documentation Team Meeting at #rust-docs on irc.mozilla.org.
- May 11. Columbus Rust Society - Monthly Meeting.
- May 11. Rust DC - Building high performance REST APIs with Rust and Rocket.
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
- RustJobs.rs - a website dedicated to Rust jobs. There are 13 open Rust positions plus a list of companies using Rust.
- Rust Software Engineer at resin.io.
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
There are many ways in which Rust is like a version of C/C++ that mutated when Haskell was injected into its veins.
Thanks to Johan Sigfrids and liquidivy for the suggestion.