This is one of my fave diagrams I& #39;ve ever made on Rust. It& #39;s a simplified model of different "modes" of Rust you can program in.

Const rust is working on carving out a subset of "base" rust. Async rust is working on carving out a superset of that same base.
You could draw a similar graph including "unsafe Rust". Just like async rust, it& #39;s a superset of "base Rust", providing access to:
- raw pointer manipulation
- `extern C` to perform FFI
- `UnsafeCell` for interior mutability
The reason why this is a simplification is because even though `const` and `async` are mutually exclusive today there& #39;s nothing inherently making them incompatible (other than it not being very useful).

Also once you consider different supersets, you& #39;ll realize they may overlap.
A real challenge in language design is though to make all these different modes you can be writing Rust in still feel like they& #39;re part of the same coherent language. The goal is to provide top-notch ergonomics, performance, diagnostics, correctness, etc. for *all* modes of Rust.
You can follow @yoshuawuyts.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: