impl period newsletter
The impl period
The “impl period” consists of 37 working groups, all helping push our 2017 roadmap to completion! There’s a global Gitter channel (with IRC bridge), and dedicated channels for each working group.
This effort is intended for people with all experience levels and interests — there really is something for everyone, and the WG leads are putting a ton of work into mentoring. If you’re not sure what working group is right for you, drop by the main chatroom and introduce yourself, and we’ll help you find your way!
Highlights
A lot has happened since the last newsletter! We had a very successful “impl days” sprint at Rust Belt Rust, which included:
- nmatsakis and spastorino pairing to get the very first end-to-end piece of NLL working.
- acrichto getting the pure-wasm (no emscripten needed) backend cooking.
- withoutboats finalizing their design of the “failure” crate; blog announcement coming soon.
- aturon worked out a new overall structure for the home page content.
- aturon, ag_dubs, steveklabnik and acrichto worked out the core ideas for a new book on async in Rust.
- carols10cents hammering away on alternative registries.
- arielb1, nmatsakis, and aturon mind-melding on the trait system
- aturon and nmatsakis maybe finding a route to sound specialization??
- nmatsakis and aturon laying out a sprint to the finish line.
- acrichto building a star destroyer.
- surely more that I missed (pleae add in the comments!)
But that’s just a small fraction of what’s been happening. See the shoutouts below for a longer (but still not comprehensive!) list.
Where help is most needed
WG-rand
We have a new issue tracker, regarding status of design & implementation
WG-libs-blitz
- Reqwest needs more feedback.
- Rayon needs more docs.
WG-infra-crater
- Always looking for more participants on this vital piece of infrastructure!
Shoutouts
WG-libs-cookbook
Covers 03.10.2017 - 29.10.2017.
- @Ophirr33 Corrected typos
- @AlexEne Added measure-elapsed-time example
- @j-haj Adds parallel map-reduce recipe
- @j-haj Adds search unordered items in parallel example
- @j-haj Updates the wording on error handling to improve clarity in CONTRIBUTING.md
- @sb89 Update examples with “for_each”
- @ludwigpacifici add “Obtain backtrace of complex error scenarios” example
- @bobbo Add ‘Compile a C library while setting custom defines’ (#295)
- @j-haj Adds recipe for salt and hash a password using ring crate
- @ludwigpacifici Add “read csv records”
- @bobbo Add “Check external command version for compatibility”
- @thibaultbarbie Add c++ linking example
- @sb89 Added “Check if given version is pre-release” example.
- @mykalu Match semver crate examples’ styling
- @Yarn add “Sign and verify a message with HMAC digest” example
- @curbyourdogma Add “Run an external command passing it stdin and check for an error code” example
- @jbolila Add “Make a partial download with HTTP range headers” example #291
- @FaultyRAM Add “Parse a complex version string” example
- @ludwigpacifici Add “Run piped external commands” example
WG-libz-blitz
Covers 05.10.2017 - 28.10.2017. BurntSushi/same-file
BurntSushi/walkdir
alexcrichton/flate2-rs
- @oyvindln Documentation - Mention rust backend & update miniz and flate info
- @ovibos Fix typo in Status documentation in mem.rs
- @Frommi Rust backend miniz_oxide
carllerche/mio
- @carllerche Bump version to v0.6.11
- @FuGangqiang fix doc
- @jtescher Fix small typos
- @alexcrichton Avoid runtime panics in IoVec on Windows
- @GabrielMajeri Fix Android CI
- @cramertj Sync with Fuchsia
nikomatsakis/rayon
- @mbrubeck Fix some markdown formatting in docs
- @marmistrz Document setting the number of threads
- @MajorBreakfast Inherent mutability -> Interior mutablility
- @cuviper Add thorough tests for Producer::split_at
- @cuviper Implement Clone for parallel iterators
- @cuviper Don’t mask warnings, clean them up!
- @cuviper Remove rayon::split, leaving only rayon::iter::split
- @cuviper Add an Intersperse adaptor
- @cuviper Fix unused warnings in interleave
- @cuviper Enable bors-ng
- @cuviper Solve inter-pool deadlocks
- @Aceeri Replace try! with ? and some examples for ParallelIterator methods
- @cuviper Add Repeat and RepeatN
- @leodasvacas Bump futures to 0.1.16, move to Notify API
-
@cuviper Introduce
join_context
which tells whether jobs were stolen
seanmonstar/num_cpus
sebasmagri/env_logger
- @FuGangqiang fix doc and reformat code style
- @KodrAus Add examples for custom format and logger impls
- @sfackler Fix std feature name
- @jimmycuadra Adds a new constructor and init functions for custom env vars.
- @jimmycuadra Update to the latest commit of log/deny debug impls, missing docs, and warnings.
steveklabnik/semver
- @muzikmoe Libz blitz/turn references to other semver items int links
- @muzikmoe Libz blitz/use question mark instead of unwrap in examples
WG-libs-guidelines
Covers October 25 — October 29
- Taking Read/Write generic parameters by value
- Implementing errors correctly
- How to decide whether to provide Serde impls
- Special case for Cell-like types and get_mut
- Naming convention for get_unchecked_mut
- Make Cargo documentation metadata optional
- Clarify naming convention of borrowed → borrowed conversion methods
- Case convention for macros
- The private supertrait pattern
- Discourage -rs or -rust suffix on crate names
- Recommend tagging commits for each release
- How to document safety considerations
- Clarify that not all panics need to be documented
- Capitalization and punctuation of error messages
- When to use doc(hidden)
- Note about pub(restricted)
- Be consistent about word order
- What to write in Error::description()
- The difference between from_foo and From
- Convention around into_inner()
- Naming getters
- Getters vs conversion methods
Brand new guidelines
- Getter names follow Rust convention (C-GETTER)
- Names use a consistent word order (C-WORD-ORDER)
- Error types are meaningful and well-behaved (C-GOOD-ERR)
- Generic reader/writer functions take R: Read and W: Write by value (C-RW-VALUE)
- Rustdoc does not show unhelpful implementation details (C-HIDDEN)
- Sealed traits protect against downstream implementations (C-SEALED)
WG-libs-simd
- @alexcrichton for proposing stabilization path and keeping the trains running
- @gnzlbg for awesome work on adding intrinsics for ARM
WG-dev-tools-bindgen
- 0.31.0 release! Check out the release notes and list of everyone who helped make it happen here: https://users.rust-lang.org/t/bindgen-automatically-generate-rust-ffi-bindings-to-c-and-c-libraries/12126/4
- (And a couple point releases since then with minor bug fixes)
-
@fitzgen removed the dependency on the unmaintained
syntex
[crate]- and build times were cut in half! ~90 seconds to ~45 seconds!
-
@fitzgen made it so that our
csmith
fuzzer will automatically runcreduce
on test cases that uncover bugs inbindgen
-
@fitzgen fixed translation of constant integers that were greater than
u32::MAX
-
@fitzgen made determining which
struct
s need an explicit virtual table pointer into a fixed-point analysis -
@pepyakin enabled emitting
derive(Clone)
when targetting Rust >= 1.21, now thatClone
is a builtin item - @jrmuizel extended our IR to keep track of functions’ and methods’ linkage; one day we hope to emit C trampolines for inlined functions and methods
- @seemyvest improved our error messages and handling when given unreadable files or folders as input headers
-
@photoszzt fixed a bug where
bindgen
would erroneously emitderive(Hash)
for flexibly sized arrays -
@hallfox added the ability to skip deriving
Clone
andCopy
for specific types -
@fitzgen made
bindgen
's type sizedness computation into a fixed-point algorithm -
@seemyvest added the ability to skip deriving
Hash
for specific types -
@manaskarekar made it so that
bindgen
willrustfmt
its generated bindings not only when writing them into a file, but also when printing tostdout
- @emilio fixed a bug where C++ references were getting template type parameters that they shouldn’t
-
@photoszzt fixed a bug in the
impl ::std::fmt::Debug for …
blocks thatbindgen
emits where an unmangled name was used when it should have been mangled
WG-compiler-incr
We have seen some incredible contributions to incremental compilation since the last newsletter:
- @vitiral has given the testing framework for incremental compilation hashes a comprehensive revamp which makes writing the respective tests much more concise and involved updating a ton of existing tests!
- @theotherjimmy has continued to power through multiple refactorings and improvements, like adding the ensure() primitive to the query system, turning vtable computation into a query, and cleaning up some of the core functionality of the query system.
- @wesleywiser has finished their work of turning trans-time trait selection into a query and then gone on to implement “eval-always queries”, a new kind of query that optimizes certain workload patterns.
- @SimonSapin has adapted legacy dependency tracking code in variance computation to the new red-green system and volunteered to add and maintain two large test cases from the Servo project on http://perf.rust-lang.org.
- @Xanewok has cleaned up a long-standing FIXME around crate disambiguators and has brought some of the stable infrastructure from incr. comp. to the RLS.
- @alexcrichton has adapted the unused-mut-nodes pass to the query system and made part of the compilation pipeline more multi-threaded which will help ThinLTO as well as incr. comp.
-
@michaelwoerister has fixed some bugs in the incr. comp. hashing code, added some documentation to the important
force_from_dep_node()
procedure, re-implemented -Zincremental-info after red-green tracking had broken it, switched incr. comp. hashing from BLAKE2 to 128 bit SipHash for increased performance, fixed some bugs in the HIR hashing code, updated some of the diagnostics framework to avoid emitting duplicate error messages during incr. comp., and done some preliminary work for caching MIR and type-information. - And finally, @aturon has put out a call to help benchmark incremental compilation which has received an awesome amount of feedback so far!
WG-compiler-front and WG-compiler-middle
Completed:
-
dyn Trait
syntax is available on nightly thanks to @petrochenkov - the
crate
keyword can now be used to describe visibility of an item, thanks to @zackmdavis - we now have an (opt-in, for now)
unreachable-pub
lint for detecting things declared aspub
but no reachable from outside the crate, thanks to @zackmdavis - we now permit
'``_
to explicitly elide a lifetime, thanks to @cramertj - default match bindings are available on nightly thanks to @tschottdorf
- also thanks to @tamird for advertising them better when an error occurs
- we now have
#[non_exhaustive]
working on nightly, thanks to @davidtwco - @sunjay landed a number of refactorings towards Generic Associated Types
In progress:
-
@pietroalbini is working on use import groups (
use foo::{a, bar::{b, c}}
) -
@slo1 has been working on supporting
foo.rs
modules that permitfoo/bar.rs
submodules -
@chrisvittal is getting very close to supporting
impl Trait
in argument position (fn foo(x: impl Iterator<Item = u32>)
) - @sunjay has been working on extending the parser to support Generic Associated Types
- @qwz is pushing on permitting the elision of lifetimes in impl headers
-
@cramertj has been making progress towards the newer semantics for
impl Trait
in return position - @durka has been working on trait aliases
WG-compiler-nll
Completed:
- MIR borrowck is now reporting more errors more correctly, thanks to @mikhail-m1, @zilbuz, and @KiChjang
- NLL is now integrated with MIR borrowck and passing a few, simple steps
- thanks to @spastorino and @nikomatsakis
- MIR borrowck is now safely handling edges in match, thanks to @mikhail-m1
In-progress:
- Niko ran out of time
WG-dev-tools-clippy
17 new lints in clippy: