Posts in rust


TIL: Running `cargo-flamegraph` With Tauri Apps
• 1 min read

A Tauri app is just a Rust-compiled binary. But because the Tauri workflow also involves some frontend development you normally develop your app using something like:
Continue Reading »

TIL: Base64 Encoding an ImageBuffer as PNG(in Rust)
• 1 min read

Recently, I had to base64-encode an image::ImageBuffer to send it as a data URL like
Continue Reading »

On porting code
• 3 min read

Of late, my main side project has been rug, a stripped-down Git implementation which I'm building in Rust. I'm following along James Coglan's excellent book Building Git where he lays out how he went about building the same project, in Ruby.
Continue Reading »

Disk-based algorithms
• 3 min read

I have lately been studying how databases work under the hood. There are many problems that a database has to solve. At the moment, I've been having fun exploring how data is stored on disk. Previously, I wrote about how a hashtable is stored on disk. This post is somewhat similar– I talk about how data stored on disk can be sorted.
Continue Reading »

Implementing a Key-value Store, Part 2
• 14 min read

In the last post, I introduced the idea of linear hashing. This post will describe a Rust implementation of the algorithm. I won't go through every last line of code, but hopefully enough to give you a good understanding of how the whole thing works. I should also mention that even though this is a post about implementing linear hashin...
Continue Reading »

Implementing a Key-value Store, Part 1
• 8 min read

In this series of posts, I want to walk you through how to build a simple, persistent key-value store. We will be using an on-disk hashtable(also called external hashtable) to store the key-value mappings. In this post, I will explain hashtables briefly and an algorithm called linear hashing. In the next post, we'll look at an implemen...
Continue Reading »