October 24, 2021

Pointer Fu: An adventure in the Tokio code base

In an effort to understand the internals of asynchronous runtimes, I’ve been spending time reading Tokio’s source code. I’ve still got a long way to go but it has been a great journey so far. The one thing that's helped improve my Rust (and general computing knowledge) the most has been reading Tokio's and smol-rs' code base. It's been interesting watching myself going from mind-boggling confusion to reading parts and thinking, "this all makes sense". Read more

September 5, 2021

State machines in Rust

In Rust, you often hear about state machines. Futures are state machines! I thought it would be cool to read more about it. I came across this blog post (funnily enough, by a friend and mentor of mine) which really helped me! I highly recommend reading it. In this post, I’m just noting the part I found relevant. The example here is from her blog post. P.S.A: Go and read that post 😆 Read more

September 5, 2021

Two learnings on implementing traits

Some time ago, I came across two challenges with implemeting traits: Implementing a trait on another trait Using multiple, separate traits bounds on a trait implementation Implementing a trait on another trait Honestly, I’ve forgotten why I wanted to do this. Nonetheless, this is not possible in Rust. And rightfully so, can you imagine how much of a mess that would be? However, the way around this is through a neat Rust feature: trait bounds! Read more

Powered by Hugo & Kiss.