X86-64 ASSEMBLER + JIT · RUST
tinyasm
A compact assembler and JIT execution engine for learning how x86-64 machine code fits together.
Encoding instructions by hand
tinyasm uses a two-pass assembler for forward and backward label resolution and implements encoding for common instructions, REX prefixes, relative jumps, and ModR/M and SIB based memory operands.
From bytes to execution
The JIT path allocates memory, writes generated machine code, changes page protections, and executes the result as a native function. It is intentionally small enough to make the path from an instruction representation to executable bytes easy to inspect.