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.
Updates from Rust Community
News & Blog Posts
- Announcing Rust 1.17.
- Helix: Native Ruby extensions without fear.
- bindgen now has a users guide.
- Asynchronous Rust for fun & profit.
- Rust your ARM microcontroller. Build Rust applications for any ARM Cortex-M microcontroller.
- Lessons learned redesigning and refactoring a Rust library.
- Implementing Weld in Rust.
- The RustConf 2017 call for proposals is now open.
- Last week's visual guide for rustfmt’s configs has been merged into rustfmt project along with 120 unit tests.
- This week in Rust docs 54.
- This week In Servo 100.
Crate of the 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.
- Rust team is looking for someone to take over the process of making Rust's release notes.
- 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] tokei: AutoHotKey support. Tokei is a program that displays statistics about your code.
- [less easy] tokei: Move CI to trust.
- [easy] maud: Remove
error!macro. Maud is an HTML template engine for Rust.
- [less easy] rust-bindgen: Add in-worklist bits to the analysis runner.
- [easy] flate2: Use distinct Flush types for
Decompress::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
120 pull requests were merged in the last week.
- LLVM upgraded to 4.0 (Hooray!)
- rust-windbg.cmd script added (Windows™ users rejoice)
- file path remapping for debuginfo and reproducible builds
- compile OpenSSL with one core only (File under: things that wouldn't happen in Rust)
- associated consts are not object safe
- parse trait objects startin with a lifetime bound
- typeck now resolves vars before
- ICE on cross-crate associated type mismatch fixed
OperandPairstruct field index
- fix lvalue ops handling
#[used]items are never dead code
- improve error on moving out of indexed content
- point to variables moved by closure on error
- queries for
describe_def, also ergonomic improvements
- we can
Step::replace_oneno longer puts a zero instead of one
traits::selectfilters out other traits' predicates (for faster compiles)
- cache symbols in
- stricter privacy checks for trait items
- reduce stack requirement for floating-point formatting
- more methods, less transmute for
impl From<&mut [T]> for Vec<T>
- The rust installer now has xz-compressed tarballs (will allow for smaller downloads in the future)
- Haiku is now a supported OS target
- Artem Chernyak
- Henri Sivonen
- Jessica Hamilton
- Titus Barik
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation this week:
- RFC 1685: Deprecate anonymous parameters.
- RFC 1868: A portability lint.
- RFC 1824: Proposal for default crate recommendation ranking.
- RFC 1866: Improve the
assert_eqfailure message formatting to increase legibility.
Final Comment Period
- [disposition: merge] Specify
- [disposition: merge] Extend entry API to work on borrowed keys.
- [disposition: close] Generators.
- [disposition: merge] Remove static bound from type_id.
- [disposition: merge] extend
?to operate over other types.
- [disposition: postpone] Add
SafeDerefMut, equivalent to
DerefMutbut which are guaranteed to always return the same object.
- [disposition: close] Allow the name (qualifier) of an enum variant to be elided in expressions and patterns whenever it can be inferred.
- [disposition: merge] Expand and stabilize
- Amend RFC 1242 to require an RFC for deprecation of crates from the nursery.
- Tiered browser support policy for Rust's web content.
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:
- Ordering of types of groups within a module
- Struct and tuple literals
- Array literals
- Where clauses
- Imports (
Good first issues:
We're happy to mentor these, please reach out to us in #rust-style if you'd like to get involved
Other interesting issues:
- 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 Rome - Rust Meetup #2 - Intro + Rocket.rs.
- 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.
- May 15. Rust Sydney Meetup - Happy Birthday Rust!
- May 16. Tokyo Rust Meetup #7 - Rust Birthday Party!
- May 17. Rust LA May Meetup - Rust Birthday Party!
- May 17. South Florida Rust - Rust Birthday Party!
- May 17. Rust Atlanta - Heterogeneous Collections in Rust at Tech Square Labs (Midtown).
- May 17. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- May 17. Rust Documentation Team Meeting at #rust-docs on irc.mozilla.org.
- May 18. Rust release triage.
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Indeed, it was that very event that lent the world to ruin...
It had been decades since the last line of C code was erased, and the last C compiler (written, ironically (but unsurprisingly), in Rust) engraved onto a golden disc and launched toward that distant star around which the GooglePepsiMusk Sphere's construction could be faintly observed. To even utter that fell syllable would be met with swift retaliation from the paramilitary Borrow Xekkers (the alphabet as well having been altered to better suit this shining memory-safe utopia). The whole world, everything, had all been rewritten in Rust, and at last the world knew universal peace and prosperity of boundless proportion.
But something stirred... a prophecy ancient in origin. The Second.0 Coming. And when realized at last, the world was divided between the forward-thinking devotees of Rust Two-Point-Oh and those vainly clinging to Rust One-Point-Four-Hundred-And-Seventeen.
And thus did The Great Schism rend interstellar civilization in twain.
There was but one ray of hope. As the fires of war rushed toward the newly-completed GooglePepsiMusk Sphere, its cadre of elite 1010x programmers set to work. Their task: to write the most advanced compound artificial intelligence ever known, one capable of averting the catastrophe consuming the universe: AlexKryton.exe . Due to Rust's incredible productivity benefits, they completed their task in a mere 22 seconds--and thanks to the Rust compiler's incredible performance, spent only nine months waiting for it compile. Using the artificial black hole at the center of the GPMS, and with only moments to spare, they sent their AI back in time, to the era of Rust's birth: 2011.
That's the whole story. And yet those perceptible among you may ask: "which version of Rust did they use?!" Alex alone knows...
 Yeah, Windows won. Sorry.
Thanks to /u/burkadurka for the suggestion.