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
- Writing a command line tool in Rust.
- A simple tip to improve Rust program speed.
- Futures and gRPC in Rust.
- Rust compile time mandelbrot.
- Rust and QML: a timely example.
- How glib-rs works, part 3: Boxed types.
- Signed vs unsigned: On integer types in Rust.
- This week in Rust docs 72.
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.
- [less easy] bindgen: Allow specifying certain types we shouldn't derive/impl Debug for.
- [less easy] bindgen: Allow specifying certain types we shouldn't derive/impl Copy for.
- [less easy] bindgen: Allow specifying certain types we shouldn't derive/impl Default for.
- [less easy] bindgen: Allow specifying certain types we shouldn't derive/impl Hash for.
- [less easy] bindgen: Allow specifying certain types we shouldn't derive/impl PartialEq for.
- [easy] bindgen: bindgen generates erroneous rust code: error: expected identifier, found
- [less easy] bindgen: Rewrite
is_unsizedas a fix-point analysis.
- [less easy] bindgen: Large bitfield causes compilation failures re:
- [easy] bindgen: Add a
- [easy] bindgen: Add
- [easy] bindgen: Add
- [easy] bindgen: Add
- [easy] bindgen: TemplateParameters' methods should just return a Vec, not an Option
- [easy] bindgen: Make BindgenOptions be pub(crate).
- [medium] allocators-rs: elfmalloc: Handle thread-local storage on platforms without
- [medium] allocators-rs: slab-alloc: Create mechanism for supporting time in no-std and no-os.
- [medium] allocators-rs: bsalloc: Support allocation failures.
- [easy] allocators-rs: Add links in documentation.
- [medium] allocators-rs: Travis: Spurious test failures on Mac.
- [easy] allocators-rs: AppVeyor: Mark appveyor.sh files executable.
- [easy] allocators-rs: test-scripts/check-copyright-comments.sh: Fix comment typo.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from Rust Core
99 pull requests were merged in the last week
- improved message on
- hint on overlapping inter-crate ambiguities
- proper expansion info for more builtin macros
- macros 2.0 now have their
Spaninclude visibility modifiers
DefIdfor local vars
- avoid hashing every
- panic on overflow in
thread_local!is now inlineable cross-crate
- avoid creating
statics for each
- MIR no longer emits
EndRegions by default
- MIR: restrict
- MIR: no longer inlines trait methods
- MIR: inliner bug fixed
- macOS users can get backtraces again
- fix macOs segfault
- more metadata methods are queries
rustc_metadatano longer needs
DepGraphhandling, remove it (now querified)
- rustc now deals correctly with really long linker commands
- rustbuild can use hardlinks again, reduces copies (my small SSD rejoices)
- cargo: hash dependencies of metadata into lib's metadata
- cargo: don't loop forever on cyclical features
- cargo: support vendoring git repositories
- Douglas Campos
- Ethan Dagner
- Jacob Kiesel
- John Colanduoni
- Lance Roy
- Max Comstock
- Zaki Manian
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation this week:
- RFC 2115: In-band lifetime bindings.
- RFC 2128: Nested groups in imports.
- RFC 2089: Implied bounds.
- RFC 2132: Copy/Clone closures.
- RFC 2086: Allow Irrefutable Patterns in if-let and while-let statements.
- RFC 2043: Add
- RFC 2070: stable mechanism to specify the behavior of panic! in no-std applications.
- RFC 2093: Infer
T: 'xoutlives requirements on structs.
- RFC 2133: Compiler-generated Clone impls for arrays and tuples.
Final Comment Period
- [disposition: merge]
dyn Traitsyntax for trait objects: Take 2.
- [disposition: merge] Introduce a public/private distinction to crate dependencies.
- [disposition: merge] Fallible collection allocation 1.0.
- [disposition: merge] Autoreferencing
- [disposition: merge] Attributes for tools, 2.0.
- [disposition: merge] Add impl Trait type alias and variable declarations.
- [disposition: merge] Evolving Rust through Epochs.
- [disposition: merge]
- [disposition: postpone] Allow comparisons between integers of different types.
- [disposition: merge] Const generics.
- [disposition: merge] Add external doc attribute to rustc.
- [disposition: merge] Change the default URL of doc.rust-lang.org.
- [disposition: merge] Clarify and streamline paths and visibility.
- Add support to Cargo for alternative registries.
- Type privacy and private-in-public lints.
- Allow autoderef and autoref in operators.
- Adding unsafe modules and unsafe blocks outside functions.
- Add match/in statements.
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!
The RFC style is now the default style in Rustfmt - try it out and let us know what you think!
We're currently writing up the discussions, we'd love some help. Check out the tracking issue for details.
- Sep 14. Rust Washington, DC - Hacktember.
- Sep 14. Columbus Rust Society - Monthly Meeting.
- Sep 14. St. Petersburg, Russia - Game Development in Rust.
- Sep 20. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- Sep 20. Rust Documentation Team Meeting at #rust-docs on irc.mozilla.org.
- Sep 20. OpenTechSchool Berlin - Rust Hack and Learn.
- Sep 21. Rust release triage.
- Sep 24. Rust Indonesia - Level up Your Knowledge on Rust.
- Sep 25. Rust Paris Meetup #38.
- Sep 27. Rust Community Team Meeting at #rust-community on irc.mozilla.org.
- Sep 27. Rust Documentation Team Meeting at #rust-docs on irc.mozilla.org.
- Sep 28. Mozilla Community Dresden - Rust Meetup.
- Sep 30 - Oct 1. RustFest Zürich.
- Sep 30. Rust Mexico #8: Taller Introductorio a Rust y Rocket.
- Oct 2 - Oct 3. Impl Days at RustFest Zürich.
No jobs listed for this week.
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
When programmers are saying that there are a lot of bicycles in code that means that it contains reimplementations of freely available libraries instead of using them
Presumably the metric for this would be bicyclomatic complexity?
Thanks to Matt Ickstadt for the suggestion.