# cksystemsteaching/selfie

An educational software system of a tiny self-compiling C compiler, a tiny self-executing RISC-V emulator, and a tiny self-hosting RISC-V hypervisor.

Repository: https://github.com/cksystemsteaching/selfie
Canonical: https://ross.abutalabs.com/products/selfie
Homepage: http://selfie.cs.uni-salzburg.at
Language: Jupyter Notebook
License: BSD-2-Clause
License Family: permissive
Topics: teaching, computer-science, compiler, emulator, virtual-machine, symbolic-execution-engine
Last push: 2026-08-08T15:33:01+00:00

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

## Adoption (not part of the score)
Stars 2519, forks 355 (observed 2026-08-28T04:06:58.226372+00:00)

## What it is
Selfie is an educational 12KLOC single-file C implementation of a self-compiling C compiler (starc), a self-executing RISC-V emulator (mipster), and a self-hosting RISC-V hypervisor (hypster). It is designed for teaching undergraduate and graduate students the design of compilers, operating systems, and virtual machine monitors.

## Use cases
- teach compiler construction to students
- learn how a RISC-V emulator works
- study hypervisor and virtual machine monitor design
- explore self-compiling and self-hosting systems code
- run tiny C programs on RISC-V in a classroom setting
- learn systems programming with a minimal codebase

## When to choose
- teaching or learning compilers, emulators, or hypervisors from a small readable codebase
- you want a minimal educational RISC-V toolchain
- you need a self-contained system for a computer science course

## When to avoid
- you need a production-grade compiler or RISC-V toolchain
- you require full C language support or high performance
- you need a general-purpose emulator for real-world software

## Facets
- artifact type: learning-resource
- maturity: active
- function: compiler, interpreter, simulation
- domain: education, compilers, operating-systems, programming-languages
- platform: windows, cross-platform, cli
- tags: risc-v, teaching, hypervisor, emulator, self-compiling-compiler, systems-programming, c-star, education, virtual-machine, computer-science, linux, macos

## Member repositories
- cksystemsteaching/selfie (main) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:58.226372+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:26:06.786014+00:00, confidence not recorded.
  - readme: https://github.com/cksystemsteaching/selfie (fetched 2026-08-28T04:06:58.226372+00:00, sha 726c233a1967)
  - homepage: http://selfie.cs.uni-salzburg.at (fetched 2026-08-29T10:08:17.204916+00:00, sha ab4981c77534)
- Data as of 2026-08-30T08:39:29.467469+00:00.
