For my fellow Rust enthusiasts, it is well-known that the compiler is able to perform some optimizations, called “niche”, that can make, for example, an Option<NonZeroU32>
fits on 32-bits. In this article, I will try to understand how it extends to some other enum types, and how the compiler achieves this.
Tag: rust
In this article, we will consider a simple program computing the sum of a vector numbers, see the differences of performances when running it with cargo run
and cargo run --release
. We will then try to understand where this difference comes from and have some surprises.
This is the second article of a serie that will explore how we can build a simple debugger in Rust. In this article, we add the possibility to put breakpoints to our debugger, and we create a way to interact dynamically with our debugee.
This is the first article of a serie that will explore how we can build a simple debugger in Rust. In this article, we start by exploring how to use syscall to halt and resume program, and examine the state of the registers.