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
- Iteration patterns for Result & Option.
- Corrode update: control flow translation correctness.
- Calling Rust from Python.
- Notes from the Rust+GNOME hackfest in Mexico City, part 1.
- A demo of calling JavaScript from Rust in WebAssembly.
- zk-SNARKs zero-knowledge proofs in Rust.
- Launching a URL shortener in Rust using Rocket.
- Visual Studio Code 1.11 is released and its text search functionality is powered by ripgrep - a tool written in Rust.
- Announcing
runtime-fmt
, a crate for using runtime format strings. - This week in Rust docs 51.
- This week in Servo 97.
Crate of the Week
This week's Crate of this Week is rust-skeptic, a cargo subcommand to doctest your README.md. Thanks to staticassert 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.
- Rusoto an AWS SDK for Rust is looking for maintainers.
- Rust reference docs: Document all features.
- rust: Error message when VS 2015 build tools exist but not the SDK needs to be better.
- [easy] lazy_static: Set html_root_url crate attribute. lazy_static is a small macro for defining lazy evaluated static variables in Rust.
- [easy] lazy_static: Change Cargo.toml
documentation
to point to "https://docs.rs/lazy_static". - [easy] lazy_static: Include
homepage
in Cargo.toml. - [easy] lazy_static: Include
categories
in Cargo.toml. - [easy] lazy_static: Publish CI badges for all Tier 1 platforms.
- [easy] flate2: Remove R: Read bounds on structs. flate2 implements FLATE, Gzip, and Zlib bindings for Rust.
- [easy] flate2: Method to get mtime of a GzHeader as a datetime.
- [easy] flate2: Clarify documentation of GzHeader::mtime.
- [easy] flate2: GzBuilder methods should take
Into<Vec<u8>>
. - [easy] flate2: All public types should implement
Debug
. - [easy] flate2: Eagerly implement common traits.
- [easy] flate2: Wire up rustdoc hyperlinks.
- [easy] flate2: Publish CI badges for all Tier 1 platforms.
- [easy] flate2: Use distinct Flush types for
Compress::compress
vsDecompress::decompress
. - [easy] flate2: Document error conditions in "Errors" sections.
- [easy] flate2: Document the GzBuilder panic cases.
- [easy] flate2: Write usage examples.
- [easy] flate2: Rename internal types to match the public types.
- [easy] bitflags: Resolve clippy lints. Bitflags is a Rust macro to generate structures which behave like a set of bitflags.
- [easy] bitflags: Mention Default trait in the docs.
- liner: Make keyboard interrupts (e.g. SIGINT from Ctrl-c) work. Liner is a readline-like library in Rust.
- liner: Tilde expansion.
- liner: Password mode.
- liner: Use right arrow key to select autocompletion.
- Ion: Optional Descriptions for Functions. Ion is a shell for UNIX platforms, and is the default shell in Redox.
- Ion: Implement Mapfiles.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from Rust Core
132 pull requests were merged in the last week.
- ABI layout computation is no longer tied to LLVM (yay!)
- new
#[used]
attribute - the "visible parent map" is now immutable (potentially, but unlikely plugin-breaking)
- undefined types (e.g. due to parsing errors) are now
TyError
instead ofTyInfer
(potentially plugin-breaking) - avoid dropflags creation for empty drops
- the
overlapping_inherent_impls
lint is now a hard error - fix macros including
#[derive]
s - on Linux, use
poll
instead ofselect
(for more than 1K file descriptors) - improve
iterator::Rev::
{find
,rfind
} plumbing (also onslice::Iter
/IterMut
- simplify
HashMap::Bucket
for awesome speedups - optimize
AtomicBool::fetch_nand(..)
RawFd
no longer implementsAsRawFd
/IntoRawFd
Vec::place_back()
no longer requiresT: Clone
- new
[T]::
{rsplit
,rsplit_mut
}(..)
methods - add safe wrapper for
atomic_compilerfence
intrinsics - on-demandify reachability
- point out private fields inadvertently called as methods
- better error message on missing item category
- Suggest enum when variant is erroneously used as type
- don't try to blame tuple fields for immutability
- always show the end of multiline annotations
- show last valid token on syntax errors
save-analysis
tracks associated types- allow multiple output types again (regressed after 1.14)
- rustdoc now uses pulldown-cmark instead of hoedown (also assorted issues fixed)
- crates.io now shows links directly under crate name header
New Contributors
- Anatol Pomozov
- Bryan Tan
- GitLab
- Matthew Jasper
- Nathan Stocks
- Peter Gerber
- Shiz
Approved RFCs
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation this week:
No RFCs were approved 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: postpone] Introduce
with
bounds for pi types. - [disposition: merge] extend
?
to operate over other types. - [disposition: merge] Remove static bound from type_id.
- [disposition: merge] Extend entry API to work on borrowed keys.
- [disposition: merge] Deprecate anonymous parameters.
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:
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 12. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- Apr 12. Rust Documentation Team Meeting at #rust-docs on irc.mozilla.org.
- Apr 13. Rust Melbourne - Why your first FizzBuzz Rust implementation may not work.
- Apr 13. San Diego Rust.
- Apr 13. Rust Meetup Hamburg - Hack & Learn Tokio Edition.
- Apr 13. Columbus Rust Society.
- Apr 16. Beijing Rust Meetup.
- Apr 18. Mozilla Meetup Switzerland - Iron - Web development with Rust.
- Apr 19. OpenTechSchool Berlin - Rust Hack and Learn.
- Apr 19. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- Apr 19. Rust Documentation Team Meeting at #rust-docs on irc.mozilla.org.
- Apr 20. Rust release triage.
- Apr 20. Rust Utrecht - Use Rust: Mentored Workshop.
- Apr 27. Rust Stockholm - Rust meetup @ Distil Networks.
- Apr 27. Rust Meetup Dresden.
- Apr 30. RustFest 2017 - Kyiv, Ukraine.
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
No jobs listed for this week.
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Nobody expects the Rust Evangelism Strike Force! Our chief weapon is surprise, surprise and fearless concurrency... fearless concurrency and surprise... our two weapons are fearless concurrency and surprise, and ruthless efficiency our three, weapons are fearless concurrency, and surprise, and ruthless efficiency, and an almost fanatical devotion to zero-cost abstractions. Our four, no--amongst our weapons... Amongst our weaponry... are, such elements as fearless concurrency, surprise... I'll come in again.
Thanks to shadow31 and KillTheMule for the suggestion.