English overview. The project's primary documentation is in Chinese (
README.md). This page exists so that non-Chinese readers and AI agents can judge the project quickly.
Jiayan is a programming language whose keywords and identifiers are Chinese, and whose compiler is written in itself.
Your source can use Chinese keywords (整 甲 = 1;), English C keywords (int 甲 = 1;), or both mixed in the same file — the frontend is a single unified parser, not two versions.
The compiler:
python scripts/check_elf_selfhost.py (WSL required)The repo ships one prebuilt compiler (qcc_zh_seed.exe, 18.08 MB — a frozen fixpoint artifact, deliberately committed so you need nothing else).
git clone https://gitee.com/zheng-yuhe-from-guangdong/qi-yuan--jia-yan.git
cd qi-yuan--jia-yan
powershell -ExecutionPolicy Bypass -File scripts/verify_90s.ps1Pass criterion: [PASS] 90 秒自证 全绿:8 项通过 / 0 失败. Measured 9.1 s on Windows x64.
It checks: compiler selftest → compile & run the bundled example → Chinese keywords → -graph knowledge-graph export → --dj structured JSON diagnostics.
Windows x64 needs nothing but the bundled seed. Linux (x86-64, ELF) is reached by cross-compiling (
qcc_zh_v2.exe --target=elf) and then bootstrapping natively — seepython scripts/check_elf_selfhost.py(WSL required).
| Fact | Value | How to check |
|---|---|---|
| Chinese main source | srclib_jiayan/qcc_zh.jy · 39,063 lines, all-Chinese identifiers | (Get-Content srclib_jiayan/qcc_zh.jy).Count |
| Bootstrap convergence | v1 == v2 == $expected (one-step) — hash is not pinned here; the single source of truth is the $expected value inside the script | scripts/build_zh.ps1 -NoSeed |
| Chinese feature anchors | 1,482 files scripts/feat_zh_*.c | (Get-ChildItem scripts/feat_zh_*.c).Count |
| Language mechanism ledger | 291 items: 284 implemented / 2 surface-only / 5 missing | manual/机制特性实现表.md |
| Chinese keywords | 38 (15 statements + 23 type modifiers) | manual/中文关键字表.md |
| Compiler test cases | 353 | (git ls-files tests/qcc).Count |
The bootstrap claim is real and cheap to verify: run scripts/build_zh.ps1 -NoSeed and watch v1 == v2. Full chain takes ~830 s (8-core) / 1,528 s (low-RAM); the 9-second script above is the quick path.
v1 == v2 meaningful.--interface — dumps function signatures + struct layouts (fields, offsets, sizes) as JSON. On the 39,063-line self-source: 1,175 functions / 85 structs / 48 typedefs / 1,450 globals / 126 enums, ~7 s.-graph — call graph + layout-risk ranking as JSON.--refs — "who references X" as JSON.--dj / --diagnostics=json — structured errors with code, location, fixes[], and the offending codeLine.GIT_RUN_ADAPTATIONS.md.
Scale: the official tarball measures 581 .c files / 352,215 lines in full (416 .c / 315,863 lines excluding t/ contrib/ oss-fuzz/ compat/). An earlier doc said "≈364k lines of C"; its counting basis was not recorded, so treat that figure as approximate — the two sources above are the reproducible ones.opt_zh (srclib/opt_zh.jy, 2,203 lines of Jiayan) runs 16 pass classes: stack spill / stack merge / cancel-pairs / unreachable jumps / unreachable returns / copy propagation / jump-to-next-line / frame-slot same-address / dead-store overwrite / zero-stack-adjust / G-DCE / compare-branch fusion / arithmetic immediate fusion / cross-block forwarding / push-readback / immediate shortening — plus compile-time constant folding and DCE. Verified by scripts/check_opt_census.py through two independent paths: the shipped tool's per-class counts must equal the checker's own recount on the input.These are stated plainly rather than hidden:
manual/源码导航.md maps the pipeline, and shows 5 giant functions hold 46% of the code.examples/multilang/ (85 files, 50,692 lines), and scripts/verify_multilang.ps1 compiles and runs one entry file per line: 9/9 pass in 31.6 s on Windows x64. A full sweep of all 85 files gives 72/85 independently compilable; the other 13 are 4 deliberate negative cases (keyword-protection / undeclared-identifier anchors, non-zero exit expected) and 9 historical buggy revisions kept for traceability (each already fixed in a later file, e.g. java2.c uses 该跳 where min*.c still used the keyword 跳). The older "329 cases / 326 pass" count remains an internal audit figure and is not re-asserted here.srclib/qcc_x86.c) is no longer maintained in parallel. It stopped at 22,600 lines (2026-09-06) while the Chinese source grew to 39,063. It is kept as an auditable historical trust root, not as a second implementation. A previously advertised "H1==H2 byte-identical across C and Chinese chains" property no longer holds and has been retired from the docs.| File | What |
|---|---|
README.md | Full overview (Chinese) — start here if you read Chinese |
manual/快速上手.md | Getting started, with pass criteria |
manual/源码导航.md | How to navigate ~37,000 lines — pipeline map, 5 giant functions, AI-interface recipes |
manual/数据口径与核验方法.md | Every number's provenance, including an explicit list of what cannot be verified |
manual/作品介绍.md | Project narrative / competition submission |
llms.txt, llms-full.txt | Full fact sheet for AI consumption (Chinese) |
AGENTS.md | Hard constraints for AI agents working on this repo |
Archived dataset (permanent, citable):
Qiyuan Jiayan — A Self-Hosting Chinese-Native Compiler: Source Code and Chinese Identifier Corpus. Science Data Bank (ScienceDB, CNIC, Chinese Academy of Sciences), V1, 2026. DOI
10.57760/sciencedb.0186j· CSTR31253.11.sciencedb.0186j
Machine-readable metadata lives in CITATION.cff. Release binaries are signed with Sigstore —
verification steps are in SECURITY.md.
MIT (code) + Apache-2.0 (AI training dataset / grammar spec). See LICENSE.
This English page was added 2026-10-20 so that non-Chinese readers and agents do not have to infer the project from Chinese-only docs. All numbers above were measured on Windows x64 and are reproducible with the commands shown.