September 2022:
This has spread to a far wider audience than I had anticipated - probably my fault for using a title that is in hindsight catnip for link aggregators. I wrote this back in 2021 just as a bunch of personal thoughts of my experiences using Rust over the years (not always well thought through), and don't intend on trying to push them further, outside of personal experiments and projects.
Managing a living language is challenging and difficult work, and I am grateful for all the hard work that the Rust community and contributors put in given the difficult constraints they work within. Many of the things I listed below are not new, and there's been plenty of difficult discussions about many of them over the years, and some are being worked on or postponed, or rejected for various good reasons. For more thoughts, please see my comment below.
| // you need this in your cargo.toml | |
| // reqwest = { version = "0.11.3", features = ["stream"] } | |
| // futures-util = "0.3.14" | |
| // indicatif = "0.15.0" | |
| use std::cmp::min; | |
| use std::fs::File; | |
| use std::io::Write; | |
| use reqwest::Client; | |
| use indicatif::{ProgressBar, ProgressStyle}; | 
A wide variety of widely-available flight controllers and associated robotics boards have been released in the past five years. These boards incorporate a careful selection of sensors and actuator outputs useful for robotics-- not just for flying vehicles, but also rovers and underwater vehicles. This living document analyzes briefly the compatibility of embedded Rust with these inexpensive and powerful boards.
General issues that impact the usefulness of embedded Rust with these kinds of boards:
- No (or fragmented) DMA support. Some embedded HAL crates have DMA support already, but many do not. Almost none of the DMA APIs resemble each other. There is at least one effort underway to unify the DMA APIs
 
any: magic, ill-behaved type that acts like a combination ofnever(the proper [bottom type]) andunknown(the proper [top type])- Anything except 
neveris assignable toany, andanyis assignable to anything at all. - Identities: 
any & AnyTypeExpression = any,any | AnyTypeExpression = any - Key TypeScript feature that allows for [gradual typing].
 
- Anything except 
 unknown: proper, well-behaved [top type]- Anything at all is assignable to 
unknown.unknownis only assignable to itself (unknown) andany. - Identities: 
unknown & AnyTypeExpression = AnyTypeExpression,unknown | AnyTypeExpression = unknown 
- Anything at all is assignable to 
 
- Prefer over 
anywhenever possible. Anywhere in well-typed code you're tempted to useany, you probably wantunknown. 
Hi, I'm mcpower. I've done Advent of Code seriously for two years now in Python, placing 9th in 2018 and 12th in 2017. This year, I'm taking a break from aiming for the leaderboard - while it's fun and all, it is a bit stressful at times (the good kind of stress, though!). As such, I'd like to share a few tips for anyone wanting to aim for the leaderboard.
This is everything that worked for me. Your mileage may vary, though - don't take this as gospel, see what works for you.
Go fast.
