# cnlohr/mini-rv32ima

A tiny C header-only risc-v emulator.

Repository: https://github.com/cnlohr/mini-rv32ima
Canonical: https://ross.abutalabs.com/products/mini-rv32ima
Language: C
License: MIT
License Family: permissive
Last push: 2025-12-21T09:24:01+00:00

## Health v2 (maintenance only)
Score: 58/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 58, release rhythm 35, longevity 100
- inputs: {"age_days": 1406, "days_push": 255, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2163, forks 169 (observed 2026-08-28T04:06:21.145856+00:00)

## What it is
A tiny, single-file, header-only RISC-V RV32IMA emulator written in ~400 lines of dependency-free C, capable of booting Linux (RV32-NOMMU). It includes a small demo CLI wrapper with UART, SYSCON, DTB, and kernel image loading.

## Use cases
- emulate risc-v rv32 in c
- boot linux on a minimal risc-v emulator
- embed a risc-v cpu emulator in my application
- learn how to write a cpu emulator
- run risc-v binaries without qemu
- port a risc-v emulator to embedded or weird platforms

## When to choose
- you need a tiny, embeddable, dependency-free RISC-V emulator in C
- you want to experiment with RV32-NOMMU Linux
- you want readable, hackable emulator source to learn from

## When to avoid
- you need full RV32 spec compliance, MMU, or multiprocessor support
- you need maximum emulation performance (QEMU is faster)
- you need RV64 or userspace-complete supervisor emulation

## Facets
- artifact type: library
- maturity: active
- function: interpreter, embedded, developer-tools
- domain: gaming-tools, operating-systems, developer-tools, hardware
- platform: cross-platform, windows, cli
- tags: risc-v, emulator, header-only, stb-style, nommu, single-file, embeddable, linux, macos

## Member repositories
- cnlohr/mini-rv32ima (main) score 58

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:21.145856+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:50:11.741670+00:00, confidence not recorded.
  - readme: https://github.com/cnlohr/mini-rv32ima (fetched 2026-08-28T04:06:21.145856+00:00, sha 6b80d843b21a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
