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
- Learning Rust in 2019.
- A quick look at trait objects in Rust.
- Allocations in Rust: An introduction to the memory model.
- Custom exit status codes with ? in main.
- Rust: a unique perspective.
- Rust on STM32: Blinking an LED.
- Generators I: Toward a minimum viable product.
- Aturon retires from the Core Team (but not from Rust).
- Rewriting stackcollapse-xdebug in Rust.
- Are you still using 'println' in Rust for debugging?
- UCG+Miri All-Hands 2019 Recap.
Crate of the Week
This week's crate is sysinfo, a system handler to get information and interact with processes. Thanks to GuillaumeGomez 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.
- raft: Convert
Storage::entries
'smax_size
argument toOption<u64>
. - TiKV: Convert trait objects to
dyn
syntax for Rust 2018. - TiKV: Remove all the
extern crate
s for Rust 2018. - TiKV: Add tcmalloc support to the tikv_alloc crate.
- rand: Standard should be implemented for NonZero types.
- Tarpaulin: Test coveralls with other CI services.
- Inferno: Multiple good first issues.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from Rust Core
236 pull requests were merged in the last week
- Initial addition of the Embedded Rust Book.
- Add const generics to the AST.
- Error on duplicate matcher bindings.
- libc: RFC 2235 - Implement PartialEq,Eq,Hash,Debug for all types.
- Lower constant patterns with ascribed types.
- Make
intern_lazy_const
actually intern its argument. - Avoid committing to autoderef in object method probing.
- Add #[must_use] to core::task::Poll.
- Add #[must_use] message to Fn* traits.
- Avoid some bounds checks in binary_heap::{PeekMut,Hole}.
- Make -Zdump-mir dump shims.
- Cargo: Bail when trying to run "test --doc --no-run".
- Improve error message and docs for non-UTF-8 bytes in stdio on Windows.
- Move privacy checking later in the pipeline and make some passes run in parallel.
- Overhaul
syntax::fold::Folder
. - Factor out error reporting from
smart_resolve_path_fragment
fn. - Do not ICE in codegen when using a extern_type static.
- hir: add more HirId methods.
- Implement more detailed self profiling.
- Add a forever unstable opt-out of const qualification checks.
- Initial implementation of rustfixable unused_imports lint.
- Add a query type which is always marked as red if it runs.
- Don't try to clean predicates involving ReErased.
- Deduplicate mismatched delimiter errors.
- Add suggestion for duplicated import.
- Allow #[repr(align(x))] on enums.
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.
RFCs
- [disposition: postpone] Generic integers.
- [disposition: postpone] Accept semicolons as item-like.
Tracking Issues & PRs
- [disposition: merge] Stabilize TryFrom and TryInto with a convert::Infallible empty enum.
- [disposition: merge] Tracking issue for str::as_mut_ptr.
- [disposition: merge] Stabilize slice_sort_by_cached_key.
- [disposition: merge] deprecate before_exec in favor of unsafe pre_exec.
- [disposition: merge] Stabilize linker-plugin based LTO (aka cross-language LTO).
- [disposition: merge] Tracking issue for std::iter::successors.
- [disposition: merge] Tracking issue for Option::copied.
- [disposition: merge] Tracking issue for std::ptr::hash.
- [disposition: merge] Rename
MaybeUninit
toMaybeUninitialized
. - [disposition: merge] Tracking issue for std::iter::from_fn.
New RFCs
Upcoming Events
Online
- Feb 20. Rust Community Team Meeting on Discord.
- Feb 25. Rust Community Content Subteam Meeting on Discord.
- Feb 27. Rust Events Team Meeting on Telegram.
Asia Pacific
Europe
- Feb 18. Karlsruhe, DE - Karlsruhe Rust Hack and Learn.
- Feb 20. Berlin, DE - Berlin Rust Hack and Learn.
North America
- Feb 14. Columbus, US - Columbus Rust Society.
- Feb 20. Sacramento, US - Sacramento Rust Inaugural Meetup.
- Feb 20. Chicago, US - Chicago Rust Meetup - Property-Based Testing in Rust.
- Feb 20. Vancouver, CA - Vancouver Rust meetup.
- Feb 21. San Diego, US - San Diego Rust.
- Feb 21. Arlington, US - Rust DC—Learn+Try: Custom Redis Datastructures.
- Feb 25. Durham, US - Triangle Rustaceans.
- Feb 27. Ann Arbor, US - Ann Arbor Rust Meetup.
If you are running a Rust event please add it to the calendar to get it mentioned here. Please remember to add a link to the event too. Email the Rust Community Team for access.
Rust Jobs
- Software Developer at Finhaven, Vancouver, CA.
- Software Engineer at Discord, San Francisco, US.
- Network Engineer at NearProtocol, San Francisco, US.
- Navitia Software Engineer at Kisio Digital, Paris, FR.
- Rust web developer at Impero, Denmark/remote.
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
Once again, we have two quotes for the price of one:
I love Rust because it reduces bugs by targeting it’s biggest source… me.
Say the same thing about seatbelts in a car. If you don’t plan to have accidents, why do you need seatbelts?
Car accidents, like mistakes in programming are a risk that has a likelihood that is non-zero. A seatbelt might be a little bit annoying when things go well, but much less so when they don’t. Rust is there to stop you in most cases when you try to accidentally shot yourself into the leg, unless you deliberately without knowing what you are doing while yelling “hold my beer” (unsafe). And contrary to popular belief even in unsafe blocks many of Rust’s safety guarantees hold, just not all.
…
Just like with the seatbelt, there will be always those that don’t wear one for their very subjective reasons (e.g. because of edge cases where a seatbelt could trap you in a burning car, or because it is not cool, or because they hate the feeling and think accidents only happen to people who can’t drive).
– atoav on HN comparing Rust's safety guarantees with seat-belts.
Thanks to Kornel and pitdicker for the suggestion!
Please submit your quotes for next week!
This Week in Rust is edited by: nasa42, llogiq, and Flavsditz.