Type-level programming in Rust

In Rust, there's a concept sometimes referred to as Type-level programming. To employ this, you'll create a struct, which will (among other things) contain a field of the zero-sized type PhantomData<T>: this will tell the compiler that our struct acts as if it stores a value of type T, and will only be used at compile time for static analysis. Read more in the Rustonomicon.

I've written a small example where this concept is showcased by applying it to a car, which can be found here.

Read more  ↩︎

Structure of a Rust project

It can be a bit confusing to understand how to structure a Rust project once it starts to grow beyond some Rust files directly located in src/ that are only accessed from main.rs or lib.rs. This is a simple overview of how a Rust project can be structured. For a more elaborate explanation of how to structure Rust projects, read chapter 8 of the book "Programming Rust: Fast, Safe Systems Development".

Read more  ↩︎

Using GrapheneOS, the private and secure mobile OS

Some weeks back, I bought a Pixel 6a and installed GrapheneOS on it. GrapheneOS is a private and security hardened version of Android, and so far I've had zero issues. This post will be a very brief description of the OS, and where you can find more information about it.

Read more  ↩︎

My zsh set-up

This is a short guide for my zsh set-up. I've saved it here for it to be more accessible to me when setting it up on new computers, and in the unlikely event that it would be useful for someone else. In the end, you'll have a quite minimalistic interface where you can do fuzzy searching of your command history by pressing Ctrl+r.

Read more  ↩︎