Measuring TTFB (Time to First Byte) for HTTP Requests in Rust

The other day I created a small CLI + library written in Rust, that helps to measure the TTFB (time to first byte) for HTTP GET-Requests in Rust. I had this project on my to-do list for a few months now and finally some time for it. I got inspired by the Dev Tools in Google Chrome. You can see an example screenshot from Chrome down below: I wanted to program something similar. Read more…

How to Find Out if a Binary Runs Inside QEMU

In the previous blog post we talked about how to use QEMUs debugcon feature. To do this responsibly, we should only do this if the binary runs in fact inside QEMU. To find this out, one can use the cpuid instruction. It gives us a lot of information about our environment including information about the CPU brand name or if we run inside a hypervisor. This instruction is specific for the x86-platform. It Read more…

How to Use QEMUs “debugcon”-Feature (and Write Debug Infomation to the Terminal or a File)

QEMU is a VMM often used for low-level OS/kernel development and testing. Especially when you write your own OS/kernel, things can get really hard and difficult to debug. Furthermore, there are not many debug capabilities, as you can’t write to files or print to the screen in early boot phases, thus, without loaded drivers. For these cases, QEMU has a featured called debugcon. It is not as good/prominent documented as it should be, Read more…

Rust: setTimeout and setInterval as in Javascript with “tokio” as Runtime

Even though I’m working with Rust for over 2.5 years now, I unfortunately never made a deep dive into the async/await/future-world. But I started using tokio a few days ago and a few questions came up. Tokio is a runtime for executing futures, great! For this, tokio needs some kind of “tasks” or “lightweight userland threads”, okay. To schedule N tasks across M cores, tokio need some kind of event loop,.. so.. similar Read more…

How-To: Compile EDK2/OVMF From Source on Linux [2021]

EDK2 is a development environment to create firmware implementations that follows the UEFI specification. It is part of tianocore project. which is the reference implemenation for UEFI. Multiple “packages”, which are the sources to build tianocore for different platforms (x86, ARM, QEMU), are located inside the git repository of “EDK2”. OVMF, which stands for Open Virtual Machine Firmware, is one of these packages. It enables UEFI inside virtual machines, like in QEMU environments. Read more…