4 ms·
Rust 1.44 (async/await on embedded)
- dbrgn 6y agoMy 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 6y agoMeanwhile 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 6y ago> 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_allocation https://en.cppreference.com/w/cpp/language/coroutines#Heap_a...
- deleted 6y ago[deleted]
- millimeterman 6y agoWe'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.
- kccqzy 6y agoRelying on compiler optimizations is not the answer. When they work, you don't notice, but an unrelated change could very well change the compiler's state and optimization decisions, falling off a performance cliff. This is especially pronounced in languages that rely a lot on compiler optimizations. In Haskell you can purposefully use the singly linked list for very large collections, knowing they will be optimized out, until one day the compiler decided not to optimize that and now you have a problem. There's a reason C++17 made return-value-optimization a proper part of the language with mandatory elision of copies. People like guarantees. Optimizations are but the icing on the cake.
- Others 6y agoFor 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.)
- bestouff 6y agoI 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.
- masonium 6y agoTo be clear, it's possibly a political statement but it's hardly an ad, at least in any sense that people (Americans?) traditionally use the term. I also don't think that the existence of 'more important' issues precludes the discussion of other issues that may be relevant to a large number of people (or a small number of people, for that matter). I would certainly find it annoying if every political conversation I took part in were interrupted with "Well, that's nothing to be compared to climate change", even if I believed it to be true.
- IshKebab 6y agoIt is clearly an ad. Not a commercial ad but those aren't the only kind (as you pointed out). They've opened themselves up to arguments over what non Rust-related cause to advertise next! "For Rust 1.45 I think we should put replace the release notes with a message about the civil war in Yemen."
- heavenlyblue 6y agoTech is a first-world thing. It is quite clear that the problems in the most tech-y country in the world would spill into tech itself. By the way, the same thing happens with for example suicides at Chinese factories: companies do take a stance which source from these factories because it directly affects them.
- ZoomZoomZoom 6y ago> Tech is a first-world thing. Wow, quite a statement. Guess I'm giving up on coding, then.
- trefil 6y agoBLM 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 6y agoNot 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 6y agoNext 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.
- noxer 6y agoMy 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!