This post is auto-generated from RSS feed This Week in Rust. Source: This Week in Rust 533
Hello and welcome to another issue of This Week in Rust! Rust is a programming language empowering everyone to build reliable and efficient software. This is a weekly summary of its progress and community. Want something mentioned? Tag us at @ThisWeekInRust on Twitter or @ThisWeekinRust on mastodon.social, or send us a pull request. Want to get involved? We love contributions.
This week's crate is embedded-cli-rs, a library that makes it easy to create CLIs on embedded devices.
Thanks to Sviatoslav Kokurin for the self-suggestion!
Always wanted to contribute to open-source projects but did not 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.
ockam project ticket and
ockam project enroll is improved, with support for
If you are a Rust project owner and are looking for contributors, please submit tasks here.
Are you a new or experienced speaker looking for a place to share something cool? This section highlights events that are being planned and are accepting submissions to join their event as a speaker.
If you are an event organizer hoping to expand the reach of your event, please submit a link to the submission website through a PR to TWiR.
309 pull requests were merged in the last week
split_debuginfo=off for now
#![feature(inline_const_pat)] is no longer incomplete
potential_query_instability for keys and values in hashmap
is_val_statically_known is not of a supported type
never_type feature gating
edition: headers in coverage tests
pattern_analysis: Gracefully abort on type incompatibility
pattern_analysis: cleanup manual impls
pattern_analysis: cleanup the contexts
async bound modifier on
to_ conversion methods on E0308
struct tail in ABI compat check
sched_getaffinity interception from linux'shim, FreeBSD su…
tracing crate instead of using our own
Arc allocator leaks
<T, U> for array/slice equality
io::Read::read_buf_exact error case
thread_local::register_dtor fix proposal for FreeBSD
-Zpanic-abort-tests to doctests too
redundant_locals: take by-value closure captures into account
wildcard_imports to ignore certain imports
unused_io_amount for Ok(lit), unrachable! and unwrap de…
Vec to boxed slice
Rust's CI was down most of the week, leading to a much smaller collection of commits than usual. Results are mostly neutral for the week.
Triage done by @simulacrum. Revision range: 5c9c3c78..0984bec
0 Regressions, 2 Improvements, 1 Mixed; 1 of them in rollups 17 artifact comparisons made in total
Changes to Rust follow the Rust RFC (request for comments) process. These are the RFCs that were approved for implementation this week:
Every week, the team announces the 'final comment period' for RFCs and key PRs which are reaching a decision. Express your opinions now.
sub_relations from the
An important step for RFC implementation is for people to experiment with the implementation and give feedback, especially before stabilization. The following RFCs would benefit from user testing before moving forward:
If you are a feature implementer and would like your RFC to appear on the above list, add the new
label to your RFC along with a comment providing testing instructions and/or guidance on which aspect(s) of the feature
Rusty Events between 2024-02-07 - 2024-03-06 🦀
Please see the latest Who's Hiring thread on r/rust
My take on this is that you cannot use async Rust correctly and fluently without understanding Arc, Mutex, the mutability of variables/references, and how async and await syntax compiles in the end. Rust forces you to understand how and why things are the way they are. It gives you minimal abstraction to do things that could’ve been tedious to do yourself.
What we did instead was rewrite the network part using async syntax, but using our own generator. The idea is simple: the generator produces a future when called, and the produced future can be awaited. But! The produced future contains an arc pointer to the generator. That means we can feed the generator the value we are waiting for, then the caller who holds the reference to the generator can feed the result back to the function and resume it. For the browser, we use the native browser API to derive the network communications; for other platforms, we just use regular blocking network calls. The external interface remains unchanged for other platforms.
Honestly, I don’t think any other language out there could possibly do this. Maybe C or C++, but which will never have the same development speed and developer experience.
I believe people have already mentioned it, but the current asynchronous model of Rust is the most reasonable choice. It does create pain for developers, but on the other hand, there is no better asynchronous model for Embedded or WebAssembly.
Thanks to Brian Kung for the suggestion!
Email list hosting is sponsored by The Rust Foundation🏷️ Rust_feed