Machina Code Explorer
Machina is a Rust workspace that reimplements core QEMU concepts. Search with Rust crate boundaries in mind.
Search Order
- Use
rgorrg --filesfrom the repository root. - Use
cargo metadata --no-depswhen crate ownership or package names matter. - Use
git log -- <path>for subsystem history before changing behavior. - Use the docs under
docs/en/anddocs/zh/to confirm terminology.
Repository Map
| Path | Purpose |
|---|---|
accel/ |
Execution loop, DBT control, CPU run state |
core/ |
Core traits and shared emulator interfaces |
decode/ |
Guest instruction decoding |
disas/ |
Disassembly helpers |
gdbstub/ |
GDB remote protocol support |
guest/ |
Guest architecture support code |
hw/ |
Device models and machine-specific hardware |
memory/ |
Address spaces, regions, and memory transactions |
monitor/ |
QMP/HMP monitor handling |
softfloat/ |
Floating-point helpers |
system/ |
Machine assembly and CPU orchestration |
tests/ |
Centralized machina-tests crate |
tools/ |
Developer and oracle tooling |
util/ |
Shared low-level utilities |
QEMU Concept Mapping
- TCG-like translation and execution lives mostly under
accel/,decode/,guest/, and target-specific support. - Device-model work usually starts in
hw/, then crosses intomemory/andsystem/. - Monitor and QMP-like behavior belongs under
monitor/. - QEMU comparison tooling and probes live under
tools/andtests/.
Rules
- Prefer public APIs already exposed for
machina-tests. - Do not add crate-local
#[cfg(test)]test modules; usetests/. - Check both English and Chinese docs when changing documented behavior.
Source: gevico/machina — distributed by TomeVault.