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
- Rust Survey 2019 results.
- Testing sync at Dropbox.
- Write an OS for the Raspberry Pi in Rust.
- Wired Logic - a pixel-based digital circuit simulator running in a browser (Rust compiled into WASM).
- Better stack fixing for Firefox.
- Writing Python inside your Rust code — part 1.
- wgpu-rs on the web.
- Building a Rust web browser from scratch.
- From Pratt to Dijkstra.
- Rust lang tips and tricks.
- An experiment with type-erased data structures.
- How to write CRaP Rust code.
- Intro to gfx-hal - part 3: Vertex buffers.
- How I reverse engineered the LastPass CLI tool.
- Open-sourcing dotenv-linter: lightning-fast tool to lint your .env files.
- rust-analyzer changelog 21.
Crate of the Week
This week's crate is regex2fat, a program to convert a regular expression into a decidedly nonstandard FAT32 file system.
Thanks to Josh Triplett 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.
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Updates from Rust Core
408 pull requests were merged in the last week
- remove a stack frame from
.await
calls - improve async-await/generator obligation errors in some cases
- make
needs_drop
less pessimistic on generators - provide better compiler output when using
?
onOption
in fn returningResult
and vice-versa - suggest
.into()
overtry_into()
when it would work - maintain chain of derived obligations
- chalk: recursive solver
- chalk: recursive solver: Exit early on ambiguity
- chalk: make it possible to cache the result of env elaboration
- use query to determine whether function needs const checking
- mir-opt: run
SimplifyLocals
to a fixedpoint and handle most rvalue - miri: add option to disable alignment check
- miri: let machine hook dynamically decide about alignment checks
- miri: expand frame hooks
- miri: handle
std::sync::atomic::spin_loop_hint()
- ptr: introduce
len()
method on raw slices - miri: use pre-computed layouts some more
- miri-unleashed: test that we detect heap allocations
- deprecate the
asm!
macro in favor ofllvm_asm!
- backtrace: remove memmap dependency
- cargo: several updates to token/index handling
- cargo: try to avoid panics on buggy (?) clocks
Approved RFCs
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation 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: merge] Major change proposal process for compiler team.
- [disposition: merge] Project Groups.
Tracking Issues & PRs
- [disposition: close] Tracking issue for Vec::remove_item.
- [disposition: close] Tracking issue for Box::into_raw_non_null.
- [disposition: merge] Stabilize the
#[alloc_error_handler]
attribute (for no_std + liballoc). - [disposition: merge] Make
handle_alloc_error
default to panic (for no_std + liballoc). - [disposition: merge] proc_macro: Stabilize
Span::resolved_at
andSpan::located_at
. - [disposition: close] Return error for current_exe on nonexistent file.
- [disposition: merge] Implement BitOr and BitOrAssign for the NonZero integer types.
- [disposition: merge] Should enum discriminants have generics in scope.
- [disposition: merge] stabilize BTreeMap::remove_entry.
- [disposition: merge] Remove language-level UB for non-UTF-8 str.
- [disposition: merge] Stabilize UNICODE_VERSION (feature unicode_version).
- [disposition: merge] Define UB in float-to-int casts to saturate.
New RFCs
- Transition to rust-analyzer as our official LSP (Language Server Protocol) implementation.
- Destructuring assignment.
Upcoming Events
Online
- Apr 24. Russia - Rust online meetup (translation)
- Apr 30. Berlin, DE - OpenTechSchool Berlin - Rust Hack and Learn.
- Apr 30. Zurich, CH - Rust Zurich - Security in Rust: cargo-crev and cargo-audit.
Asia Pacific
North America
- Apr 27. Durham, NC, US - Triangle Rustaceans - Project Night & Lightning Talks.
- Apr 28. Dallas, TX, US - Dallas Rust - Last Tuesday.
- May 6. Portland, OR, US - PDXRust - NES Emulation in Rust.
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
- Rust Community Engineer at Mozilla, multiple locations.
- Rust Developer at Dusk, Amsterdam, NL & remote.
- Part-time Rust Developer at Junto Foundation.
- Rust Developer at MyEmma, NL.
Tweet us at @ThisWeekInRust to get your job offers listed here!
Quote of the Week
What's special about UB is that it attacks your ability to find bugs, like a disease that attacks the immune system. Undefined behavior can have arbitrary, non-local and even non-causal effects that undermine the deterministic nature of programs. That's intolerable, and that's why it's so important that safe Rust rules out undefined behavior even if there are still classes of bugs that it doesn't eliminate.
Thanks to Louis Cloete for the suggestions!
Please submit quotes and vote for next week!
This Week in Rust is edited by: nellshamrell, llogiq, and nasa42.