Emuko: Fast RISC-V emulator written in Rust, boots Linux

Published: (February 27, 2026 at 06:01 PM EST)
4 min read

Source: Hacker News

Emuko

Fast RISC-V emulator written in Rust. Boots Linux.
emuko.dev

Features

  • RV64IMAFDC with M/S/U privilege levels and Sv39 virtual memory
  • JIT compilation for ARM64 and x86_64 hosts (adaptive selection)
  • Full Linux boot with BusyBox userland and interactive shell
  • Snapshot/restore for saving and resuming full machine state
  • Daemon mode with HTTP API and live UART command injection
  • Differential checker to validate JIT against interpreter
  • Peripherals: UART 16550, CLINT, PLIC, SBI 1.0, FDT generation
  • Single dependency (zstd), pure Rust

RISC‑V Emulator Comparison (emuko vs others)

FeatureemukoQEMU (RISC‑V virt)Spike (riscv-isa-sim)Renode
JIT / dynamic translation backend
Snapshot save + restore
Autosnapshot (periodic)
HTTP API for machine control
WebSocket UART console endpoint
Scriptable UART host bridge primitives
One‑command Debian kernel/initrd download with SHA256 verification
Built‑in JIT‑vs‑interpreter differential checker
GDB debugging workflow
Large RISC‑V board/device ecosystem (PCIe/virtio on virt)
Multi‑node simulation focus
Broad ISA extension coverage (incl. RVV, crypto, etc.)

Sources

  • QEMU RISC‑V virt machine docs:
  • QEMU RISC‑V system overview:
  • QEMU GDB usage:
  • QMP reference:
  • QEMU monitor (savevm, loadvm):
  • QEMU VM snapshots:
  • Spike README:
  • Renode README:
  • Renode state save/load + autosave:
  • Renode GDB integration:
  • Renode UART host integration:

Build

cargo build --release

The main binary is target/release/emuko.

Quick Start

1. Download a kernel

alias emuko=target/release/emuko
emuko dow

Downloads the Debian RISC‑V netboot kernel and initrd to ~/.emuko/ with SHA256 verification.

2. Boot Linux

emuko start

Starts the emulator daemon and attaches an interactive console. Keyboard shortcuts:

KeyAction
Ctrl+]Detach from console (daemon keeps running)
Ctrl+CSent to guest (interrupt running command)
Ctrl+DSent to guest (EOF)

3. Reattach or control

emuko start            # reattach console to running daemon
emuko dump             # print CPU state
emuko stop             # pause execution
emuko con              # continue execution
emuko step 1000        # step N instructions
emuko snap             # take a snapshot
emuko kill             # shut down daemon

The daemon exposes an HTTP API at http://127.0.0.1:7788/v1/api/ and a WebSocket console at ws://127.0.0.1:7788/v1/ws/uart.

Snapshots

emuko snap                 # take a snapshot now
emuko snap 5000000         # auto‑snapshot every 5 M steps
emuko snap stop            # disable auto‑snapshots
emuko ls                   # list snapshots
emuko restore    # restore a snapshot

Configuration

Pass options after emuko start, or set via environment variables or emuko.yml:

OptionEnv VarDefaultDescription
--ram-sizeRAM_SIZE1 GBRAM size in bytes
--backendEMUKO_BACKENDadaptiveadaptive, arm64_jit, amd64_jit, arm64, x86_64
--bootargsBOOTARGSserial consoleKernel command line

Getting a Kernel

Use emuko dow (see Quick Start) or grab pre‑built images from DQIB (Debian Quick Image Baker). To download a specific set:

emuko dow debian-netboot

License

Apache 2.0. See the LICENSE.

0 views
Back to Blog

Related posts

Read more »

2025 State of Rust Survey Results

Hello, Rust community! Once again, the survey team is happy to share the results of the State of Rust survey, this year celebrating a round number – the 10th e...

ClamAv with Rust-TUI

!Cover image for ClamAv with Rust‑TUIhttps://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s...