# sysprog21/shecc

A self-hosting and educational C optimizing compiler

Repository: https://github.com/sysprog21/shecc
Canonical: https://ross.abutalabs.com/products/shecc
Language: C
License: BSD-2-Clause
License Family: permissive
Topics: arm, armv7, compiler, self-hosting, c, linux, risc-v, rv32i, rv32im, riscv, qemu, cross-compiler, elf, compiler-optimization, ssa-form
Last push: 2026-08-24T06:13:21+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 2194, "days_push": 9, "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 1381, forks 164 (observed 2026-08-28T04:04:33.939648+00:00)

## What it is
shecc is a self-hosting, educational optimizing C compiler written in ANSI C that targets 32-bit ARMv7-A and RV32IM (RISC-V) Linux systems. It includes its own front-end, SSA-based middle-end optimizations, and machine code generator, producing ELF executables without external assembler or linker.

## Use cases
- compile a subset of C to ARMv7 or RISC-V 32-bit Linux executables
- learn how compilers work by reading a small self-contained implementation
- bootstrap a compiler from source in stages
- study SSA-based compiler optimizations
- generate ELF binaries without needing an external assembler or linker
- cross-compile C programs for Raspberry Pi or QEMU RISC-V

## When to choose
- you want an educational, readable compiler codebase for ARM or RISC-V
- you need a self-hosting C compiler for bootstrapping experiments
- you want to compile a C subset to Linux ELF binaries without toolchain dependencies

## When to avoid
- you need full C standard compliance or production-grade optimization
- you target 64-bit architectures or non-Linux platforms
- you need a fast, mature toolchain like GCC or Clang for real projects

## Facets
- artifact type: cli-tool
- maturity: active
- function: compiler, parser, developer-tools
- domain: compilers, programming-languages, developer-tools, operating-systems
- platform: cli, cross-platform
- tags: c-compiler, self-hosting, ssa, armv7, risc-v, elf-generation, educational, bootstrapping, code-generation, linux, arm, riscv

## Member repositories
- sysprog21/shecc (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:33.939648+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-30T04:40:12.121329+00:00, confidence not recorded.
  - readme: https://github.com/sysprog21/shecc (fetched 2026-08-28T04:04:33.939648+00:00, sha 1d4960977ecf)
- Data as of 2026-08-30T08:39:29.467469+00:00.
