Overview

Top-level layout

ProjectX/
├── xemu/           RISC-V emulator
│   ├── xcore/       execution engine — CPU, MMU, devices, bus
│   ├── xdb/         debugger / monitor (REPL, breakpoints, difftest)
│   └── xlogger/     logging — colored, levelled, per-instruction trace
├── xam/            bare-metal HAL (abstract-machine) — targets xemu
├── xlib/           freestanding C library (klib) — printf, string, stdio
├── xkernels/       test kernels
│   └── tests/       am-tests, cpu-tests, alu-tests, benchmarks
├── resource/       external boot artifacts — OpenSBI, xv6, Linux, Debian
├── scripts/        CI + perf measurement scripts
└── docs/           this documentation

Component relationships

xkernel source (C / Rust)
    │
    │ compile with
    ▼
xam HAL  +  xlib (klib)
    │
    │ produces
    ▼
ELF image
    │
    │ loaded by
    ▼
xemu (xdb binary)
    │
    │ executes through
    ▼
xcore: CPU → MMU → Bus → Devices (ACLINT / PLIC / UART / VirtIO)

Crates at a glance

CrateRoleKey types
xcoreExecution engineCPU, RVCore, Bus, Mmu, Pmp, Aclint, Plic, Uart, VirtioBlk
xdbBinary + debuggerMonitor, breakpoint / watchpoint tables, command REPL
xloggerLog facadetrace! / debug! / info! macros with color + timestamp
xamGuest HAL_putch, mtime, uptime, init_trap, TrapFrame
xlibGuest C libraryprintf, memset, memcpy, strlen, strcmp, assert.h

Boot target summary

TargetMake commandFirmwareRootfs
am-testscd xkernels/tests/am-tests && make runnone (bare)
xv6cd resource && make xv6xv6 bootstrapramdisk
Linuxcd resource && make linuxOpenSBI v1.3.1initramfs
Linux SMPcd resource && make linux-2hartOpenSBIinitramfs
Debian 13cd resource && make debianOpenSBI + bootlin kernelext4 over VirtIO-blk
Debian SMPcd resource && make debian-2hartOpenSBI + bootlin kernelext4 over VirtIO-blk

See Boot targets for each in detail.