A language that compiles itself.

机会翼游 — a statically-typed, expression-oriented systems language. The compiler now compiles itself: v1.8.3 is tagged as v1.x FINAL (tag 98c8272, 2026-08-29). Stage 2 produces byte-identical .il closure (N=4, sha 03a1cdd4…). Native x86-64, via QBE.

Stage 2 byte-equal closed loop
MIT licensed
x86-64  ·  Windows
hello.jhyy
v0.7.0
$ jhyy run hello.jhyy d² = 25
Statically typed Expression-oriented Compiled to native No garbage collector First-class FFI to C Exhaustive pattern match Statically typed Expression-oriented Compiled to native No garbage collector First-class FFI to C Exhaustive pattern match
01 / Why JHYY

A language, not a framework.

Four opinions we won't compromise on. Each is a small, specific promise — not a marketing tagline.

01 Type system

Static, not gradual.

Types are checked at compile time. There is no any, no implicit conversion, no escape hatch. If a value is i32, it is i32 for the rest of the program.

type Point = struct { x: i32, y: i32 }
type Shape = enum { Circle(f32), Rect(f32, f32) }

const ORIGIN: Point = Point { x: 0, y: 0 }

fn area(s: Shape) -> f32 {
    match s {
        Circle(r) => 3.14 * r * r,
        Rect(w, h) => w * h,
    }
}
02 Control flow

Expressions, not statements.

if, match, and blocks return values. The last expression of a function is its return — no return keyword needed.

fn dist_sq(a: Point, b: Point) -> i32 {
    let dx = a.x - b.x;
    let dy = a.y - b.y;
    dx * dx + dy * dy   // ← the return value
}
03 Trajectory

A compiler that compiles itself.

v1.8.3 is tagged as v1.x FINAL. Stage 2 produces byte-identical .il output across N=4 closure iterations (sha 03a1cdd4…). The compiler that ships today was built by a previous version of itself. No longer a roadmap — shipped.

C host JHYY host Stage 2 N=4 ✓
04 Specification

One ABI to rule them all.

The language spec (v1.3.0) and the ABI (v1.0.0) are both locked. No drift between documentation and the compiler. What you read in the white paper is what runs on your machine.

SPECv1.3.0
ABIv1.0.0 · locked
BACKENDQBE
TARGETamd64_win
02 / Install

Three minutes from download to hello.exe.

Pick one path. The MSI registers .jhyy file association, adds jhyy.exe to PATH, and installs the VS Code extension — first-run wizard optional. Source build needs MSYS2 + ucrt64 toolchain.

A Recommended · Windows

One-click MSI bundle

WiX 7.0.0 MSI bundle with the .NET 8 Desktop Runtime bootstrap. Registers .jhyy file association (4-layer cleanup), adds jhyy.exe to user PATH, and installs the VS Code extension via RunOnce. UCPD.sys kernel filter bypass included.

# After install, open a new terminal:
$ jhyy run hello.jhyy
Hello, world!
$ jhyy compile foo.jhyy -o foo.exe
$ ./foo.exe
Download jhyy-installer-1.8.3.exe ~28.5 MB · WiX 7.0.0 · .NET 8 chain · sha f7996934
B Source · Makefile

Build from source.

Requires MSYS2 + mingw-w64-ucrt-x86_64-gcc + binutils. One make produces jhyy.exe. Stage 2 byte-equal closure takes a few extra seconds via make selfhost.

$ git clone https://github.com/JiHuiYiYou/JiHuiYiYou-compiler.git && cd JiHuiYiYou-compiler && make
~9 000 LOC C host + ~14 400 LOC JHYY (stage1 / self-host) · Windows x64
C Enterprise · Silent MSI

SCCM-friendly MSI.

No GUI, no .NET bootstrap, no first-run wizard. For managed deployments: SCCM, Intune, group policy. Installs only jhyy.exe + compiler runtime to INSTALLDIR.

Download jhyy-compiler-1.8.3.msi ~1.1 MB · silent install · sha d41c0da3…

Windows x64 only for v1.x. Linux and macOS targets land with v2.x (amd64_sysv + freestanding). SHA256 checksums in downloads/SHA256SUMS.txt?v=1.8.3. VSIX package (TextMate grammar + problem matchers): jhyy-lang-1.8.3.vsix.

03 / A taste of the language

Five files, the whole grammar.

hello.jhyy
extern fn puts(s: *u8) -> i32;

fn main_jhyy() -> i32 {
    puts("Hello, world!");
    0
}
type Point = struct { x: i32, y: i32 }

fn dist_sq(a: Point, b: Point) -> i32 {
    let dx = a.x - b.x;
    let dy = a.y - b.y;
    dx * dx + dy * dy
}

fn main_jhyy() -> i32 {
    dist_sq(Point { x: 3, y: 4 }, Point { x: 0, y: 0 })
}
fn fib(n: i32) -> i32 {
    if n < 2 { n }
    else { fib(n - 1) + fib(n - 2) }
}

fn main_jhyy() -> i32 { fib(10) }
type Option = enum {
    Some(i32),
    None,
}

fn unwrap(o: Option) -> i32 {
    match o {
        Some(v) => v,
        None    => 0,
    }
}

fn main_jhyy() -> i32 {
    unwrap(Option::Some(99))
}
$ jhyy run hello.jhyy Hello, world!
04 / The toolchain

A compiler, and everything around it.

You don't only get jhyy.exe. You get an editor extension, an MCP server for Claude Code, and an arena runtime — the four pieces a real language needs to be usable.

Compiler

jhyy compile foo.jhyy -o foo.exe runs the pipeline: Lex → Parse → Sema → QBE → native. Diagnostics carry line + column. Exit codes match clang. No GC, no malloc hot-path — one arena_alloc, one arena_free at the end.

  • ~9 000 LOC C host
  • ·10 .c + 9 .h
  • ·Wall · Wextra

VS Code extension

First-class .jhyy language support: syntax highlighting, snippets, problem matchers, and a configured F6 shortcut to compile & run via Code Runner.

  • ·F6 run
  • ·Ctrl+Shift+B
  • ·Snippets

MCP server

11 tools for AI agents: jhyy_run, jhyy_check, jhyy_compile, jhyy_format, jhyy_get_il, jhyy_il_diff, jhyy_lang_ref, jhyy_abi_info, jhyy_regress, jhyy_selfhost_check, jhyy_workarounds.

  • ·11 tools
  • ·Selfhost verify
  • ·Stdio

Windows installer

WiX 7.0.0 MSI bundle. 1.1 MB silent MSI for SCCM / enterprise; 28.5 MB bundle with .NET 8 Desktop Runtime chain for one-click install. Registers .jhyy (4-layer cleanup), adds to PATH, auto-installs VS Code extension. UCPD.sys kernel filter bypass via jhyy-setuc.exe (Mozilla reverse-engineered Hash algorithm).

  • ·WiX 7.0.0
  • ·.NET 8 chain
  • ·UCPD bypass
05 / The road so far

Two axes, one compiler.

A single version axis (v0.xv3.x) replaces the older phase-N numbering. v1.8.3 closed the byte-equal loop and is v1.x FINAL; v2.x and v3.x now run in parallel toward the OS.

  1. v0.x Shipped

    C host compiler

    A complete C compiler for the full language. Single-pass lex → parse → sema → QBE → native. Sets the self-hosting threshold: v0.6 + spec + ABI all locked before the rewrite begins.

    • Build & CI
    • Vendored QBE
    • Hello world
    • Enum + match
    • Slice [*]T
    • Module ns
  2. v1.x Shipped · v1.8.3 FINAL

    Self-hosting

    Rewrite the compiler in JHYY, run it on the C compiler to produce a JHYY compiler. N=4 byte-equal closure stable at v1.8.3 (tag 98c8272, sha 03a1cdd4…). 102/102 regress PASS + 4 SKIP. ACTIVE workarounds → 0; DEFERRED to v2.x → 2 (W-057 UTF-8 3/4-byte, W-058 fmod).

    • Translate C → JHYY
    • Stage 0/1/2 verify
    • Byte-equal ✓
    • Bootstrap ✓
  3. v2.x Next · OS prep

    QBE rewrite + multi-target

    Replace vendored QBE with a fully-owned backend, add amd64_sysv and freestanding targets. M1–M11 milestones drive jhyy_OS startup. Plan locked in docs/plans/v2/v2.0.0-os-prep.md.

    • Owned QBE
    • amd64_sysv
    • Freestanding
    • UEFI+PE/COFF
    • Debug ABI
  4. v3.x Parallel · OS features

    Language for an OS

    Run alongside v2.x. Adds the language surface the kernel needs: inline asm, volatile, naked, no_std, and a real &mut + lifetime story. The compiler that built the OS compiles itself.

    • Inline asm
    • volatile / naked
    • no_std
    • &mut lifetime
    • LSP / IDE
06 / By the numbers

No VM. No JIT. No runtime.

QBE compiles to amd64_win machine code at build time. The only runtime is the arena allocator — and you can disable even that. ACTIVE workarounds → 0; DEFERRED to v2.x → 2 (W-057 UTF-8 3/4-byte, W-058 fmod).

Time to hello.exe
 
On a modest laptop. Lex + parse + sema + QBE + link, end-to-end.
Minimal binary size
 
After linker dead-strip. The C runtime isn't dragged in by default.
Regress baseline
102 / 102
All .jhyy integration tests pass + 4 SKIP (across 106 total). Parity hold between jhyy.exe and jhyy_v1.exe.exe.
Stage 2 closure sha
03a1cdd4
Stage 0 → 1 → 2 → 3 → 4 all produce byte-equal .il. The compiler builds itself. Run jhyy_selfhost_check via MCP.
07 / About

北京 · RDFZ ICC · CS,
一个编译器,以及它身后的 OS。

机会翼游(JHYY)的作者。两年前在 B 站看到朝歌大佬的 z 语言,受了点启发,就开始了 JHYY。一开始没什么方向,后来慢慢成形:rust-like + arena allocator,再后来确定了自举优先的方针 — 截止 v1.8.3(tag 98c8272, 2026-08-29)都在朝着这个方向走。Stage 2 N=4 byte-equal 闭环后,v2.x(QBE 自研 + 多 target)跟 v3.x(OS 语言扩展)并行启动。

自举之后做什么?借强类型 + 编译快的优势,我们开始构想自研 OS。先后确定了 Cap<T> capability、lang-debug ABI、以及 GUI 三个方向,目标 JiHuiYiYou-OS microkernel。

写编译器之外偶尔也做点 Godot 独立游戏。GitHub 上能找到我。

项目初创不久,目前还只是一个草台班子(只有我一个人)。欢迎大家提建议、参与讨论、共同进步。

Code should have personality, and personality should have a debug mode.

QQ 社区群
429807125 QQ 搜索 “429807125” 加入 ↗
More about the project
ProjectJHYY
Chinese机会翼游
AuthorJHYY
LocationBeijing
SchoolRDFZ ICC · CS
IndieGodot
Email15901598712@163.com
CommunityQQ 429807125
LicenseMIT
Currentv1.8.3
08 / Documentation

Read the spec, not the marketing.

JHYY is documented the way compilers should be: the spec is locked at v1.3.0, the ABI at v1.0.0, and the GitHub docs are authoritative. ACTIVE workarounds → 0; DEFERRED to v2.x → 2 (W-057, W-058).

ABI v1.0.0 · locked

Application Binary Interface

Type layouts, calling convention, struct passing rules. The contract between the compiler and anything that links against it.

Open jhyy-abi-v1.0.0.md
Workarounds 0 ACTIVE

Known limitations

Every W-NNN entry with reproduction steps, root cause, and the sprint that closes it. ACTIVE → 0; DEFERRED to v2.x → 2 (W-057 UTF-8 3/4-byte, W-058 fmod). Transparency over silence.

Open workarounds.md
Examples 85+ files

Run, don't read

Every example in compiler/tests/examples/ compiles and runs. Copy one, change one line, see what breaks. The fastest way to learn the language.

Browse examples

The full docs site (tutorials, reference, search) is on the v2 roadmap. For now the GitHub docs are authoritative — every doc page is a Markdown file you can curl directly.

Write the next hello.jhyy.

Five minutes from git clone to your first compiled binary — or download the Windows installer.

v1.8.3 · stable · amd64_win · 102 / 102 PASS · Changelog · SHA256SUMS · All install options
$ git clone https://github.com/JiHuiYiYou/JiHuiYiYou-compiler && cd JiHuiYiYou-compiler