When a silicon crystal is doped with an n-type conductor on one side and a p-type conductor on the other, a PN junction is formed.
PN junctions are the elementary building blocks of semiconductor devices (diodes, transistors, solar cells, LEDs, and integrated circuits)
π Part 2/7
The Aesthetics of Semiconductor Destruction
How Rust Manages Memory
A Series of Rust concepts every developer should master π₯
π E05 - Rust Memory Layout
Null Pointer Optimization
Rust uses the null pointer optimization (or "niche optimization") for pointer types that can never represent the value 0 (null).
Optimizing Rust Firmware Size
C:\Users\Anatolii Maltsev\Documents\Coding\Rust\pico_w_blink>cargo size -- -Ax
warning: unused manifest key: target.thumbv6m-none-eabi.runner
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.06s
pico_w_blink :
section size addr
.vector_table 0xc0 0x10000000
.text 0x2a0 0x100000c0
.rodata 0x1b0 0x10000360
.data 0 0x20000000
.gnu.sgstubs 0 0x10000520
.bss 0 0x20000000
.uninit 0 0x20000000
.debug_abbrev 0x5371 0x0
.debug_info 0xa1523 0x0
.debug_aranges 0x6058 0x0
.debug_ranges 0x1d408 0x0
.debug_str 0xd6ffb 0x0
.comment 0x99 0x0
.ARM.attributes 0x32 0x0
.debug_frame 0x12cb4 0x0
.debug_line 0x4897d 0x0
.debug_loc 0x1436 0x0
.debug_pubnames 0x1e9 0x0
.debug_pubtypes 0x47 0x0
Total 0x1fdf61
The Mysterious Beauty of Semiconductors
To understand how diodes, transistors, or any integrated circuit work, you must first study the semiconductor β a material that is neither a conductor nor an insulator.
π Part 1/7
From Rust Source to Executable
The rustc
compiler manages a complex, multi-stage process that transforms human-readable Rust source code into highly optimized, machine-executable binaries.
This multi-layered pipeline is fundamental to Rust's core promises: memory safety without GC, high performance, and robust concurrency.
Tokenization
of Source Code- Building an Abstract Syntax Tree (
AST
) Macro
Expansion and Name Resolution- Transformation to
HIR
: Desugaring of syntactic constructions - Providing a
Type System
- Converting to
MIR
: Generating a Control Flow Graph Borrow Checker
- Monomorphization and generation of
LLVM IR
- Generation of machine code and
object files
Linking
: Building the final executable file
Anchor CPI
Cross Program Invocations (CPIs) allow one program to invoke instructions on another program.