One thing I like a lot about Rust is that it rarely does blow my mind.
But one crate that actually did blow my mind is corosensei. It’s not Rust per se that is so crazy here, but the way it’s essentially implementing a new language feature with assembly code. This is how you know Rust really is a systems programming language. I invite you to read the source code.
Oh wow I’ve been looking for something nice like that for ages. Python can do this and it’s really great for silicon verification test stimulus. I’ve also done it in C++ using C++20 coroutines, but they are so complicated and low level I ended up having to use a library to help (libcoro). Felt like a bit of a gap in Rust, but this looks like a great solution!
One thing I like a lot about Rust is that it rarely does blow my mind.
But one crate that actually did blow my mind is corosensei. It’s not Rust per se that is so crazy here, but the way it’s essentially implementing a new language feature with assembly code. This is how you know Rust really is a systems programming language. I invite you to read the source code.
Oh wow I’ve been looking for something nice like that for ages. Python can do this and it’s really great for silicon verification test stimulus. I’ve also done it in C++ using C++20 coroutines, but they are so complicated and low level I ended up having to use a library to help (libcoro). Felt like a bit of a gap in Rust, but this looks like a great solution!