
Rust 1.44 (async/await on embedded) - dbrgn
https://blog.rust-lang.org/2020/06/04/Rust-1.44.0.html
======
dbrgn
My personal favorite feature of this release: It enables the async/await
language feature to work on #[no_std] targets. This means that with an
appropriate executor, you can run async/await code on embedded
microcontrollers!

Ferrous Systems have written a blogpost on what async/await can look like for
writing embedded firmware: [https://ferrous-systems.com/blog/async-on-
embedded/](https://ferrous-systems.com/blog/async-on-embedded/) With Rust
1.44, this now becomes possible on the stable release of the language
(previously you needed nightly). Very exciting.

~~~
kccqzy
Meanwhile in C++ land, the recently standardized coroutine feature even
requires a heap allocation in order to work.

I can't help but think that the best minds among language designers and
systems programmers have probably already jumped ship to Rust.

~~~
tick_tock_tick
> The call to operator new can be optimized out (even if custom allocator is
> used) if

> The lifetime of the coroutine state is strictly nested within the lifetime
> of the caller, and the size of coroutine frame is known at the call site in
> that case, coroutine state is embedded in the caller's stack frame (if the
> caller is an ordinary function) or coroutine state (if the caller is a
> coroutine)

Basically if you limit yourself to only functionality supported in Rust you'll
never actually generate an allocation. Once you start using features Rust
doesn't support you need to provided memory via some means.

[https://en.cppreference.com/w/cpp/language/coroutines#Heap_a...](https://en.cppreference.com/w/cpp/language/coroutines#Heap_allocation)

~~~
millimeterman
We'll have to wait and see how finished coroutines implementations perform,
but I'm leery of the fact that sidestepping heap allocation relies on compiler
optimizations. Optimizers can be fickle and in a language like C++/Rust, I
like being 100% sure that the abstractions are zero-overhead.

------
bestouff
I know you US people are going through tough times and I deeply sympathize
with you, but I'm not fan of political ads in release announcements. There are
countless more serious problems in the world that would also deserve some
publicity, but I don't want to see them there. If I'm alone with this I'm
sorry and I'll shut up.

~~~
sgt
Agreed. Tech is and should never be political.

These kinds of statements also basically says you are not welcome if you
decide not to support movements like BLM. Perhaps as a user it does not
matter, but imagine if you were a maintainer?

Best to keep these discussions out of Rust and other projects as much as
possible. So yes, you are not alone in this.

I have to point out however that there are aspects of just pure human decency
that should be a given in any kind of collaborative project.

~~~
adamch
> Tech is and should never be political

I'm curious, do you think internet companies should refrain from releasing
statements about political issues like net neutrality or the Patriot Act?

~~~
sgt
No, but I think that's more comparable to e.g. the Civil Rights Act of 1964
(only the opposite). Even then, it's outside the scope of these software
projects, in my view.

------
trefil
BLM has nothing to do with Rust. The fact that the core team thought that it's
appropriate to project their political opinions in Rust release notes is
honestly an embarrassment.

~~~
diroussel
Not nothing to do with Rust. There is a connection. People. People write and
use Rust and people have opinions.

We've got major UK banks, with no presence in the US, making statements on the
situation. Why shouldn't the Rust dev team, who are in part US citizens.

~~~
noxer
Next we see release notes with hints to wear masks or go get the vaccine or
whatever because marks and vaccines are for people and people write Rust. Also
buy a gun because people. and vote X for president because people. Lets
justify every crap in release notes because people.

------
Others
For in depth information on what specifically was merged see:
[https://github.com/rust-
lang/rust/blob/master/RELEASES.md](https://github.com/rust-
lang/rust/blob/master/RELEASES.md) (These are the official release notes.)

------
noxer
My personal favorite feature of this release is that I didn't read it. Stooped
right as I saw their political balderdash smeared all over a f*cking release
announcement. STOP THAT CRAP!

