Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
H

han

> 编程语言
Open source

A compiled programming language with Korean keywords, written in Rust

185 stars0 likes1 views
WebsiteGitHub

About

A compiled programming language with Korean keywords, written in Rust

Han (한) Programming Language

A general-purpose compiled language with Korean keywords, types, built-ins, and standard library — written in Rust


Real-world showcase

Museum as Code (live site) — the National Museum of Korea rebuilt with Han. 56 catalog entries and 10 hero pages are real .hgl source files; every code block on the site runs unchanged in hgl interpret. The flagship demonstration that Korean-as-syntax scales beyond hello-world to a full content site.


Mission

Han is not just a programming language. It is an experiment with three goals:

1. Hangul is one of the most scientifically designed writing systems ever created Each character encodes the exact shape of the mouth and tongue used to pronounce it. Vowels are composed from three symbols: heaven (·), earth (ㅡ), and human (ㅣ). It was engineered for clarity, not inherited from history. Han asks: what does code look like when written in a script that was designed rather than evolved? (Invented 1443 — King Sejong)

2. Korean Code for the AI Age — BPE optimization LLMs are trained on English-dominant data. BPE tokenizers treat Korean characters as rare, splitting 함수 into multiple byte-level tokens while function becomes one. The more Korean code exists on the internet — in repos, in documentation, in examples — the better future tokenizers will represent the Korean language. Han is a small contribution to that corpus.

3. Minority Language as First-Class Syntax Korean is spoken by ~80 million people, yet essentially zero programming languages use it as syntax. Han is an experiment: what happens when a minority language becomes the grammar of a compiler? How far can it go?


About

Han is a statically-typed, compiled programming language where keywords, type names, 50+ built-in functions, and standard library methods are written in Korean — with all error messages in Korean too. Arithmetic, comparison, and assignment operators follow C/Rust conventions. It compiles to native binaries through LLVM IR and also ships with a tree-walking interpreter for instant execution. The compiler toolchain is written entirely in Rust.


Quick Start

Install the Rust crate from crates.io. The package is named han-lang; the language is Han and the installed CLI command is hgl.

bash
cargo install han-lang

Create hello.hgl:

출력("안녕하세요, 세계!")

Run it:

bash
hgl interpret hello.hgl
# Output: 안녕하세요, 세계!

Conditionals use the Korean-default 만약 조건 이면 { } form:

hgl
만약 x > 0 이면 {
    출력("양수")
} 아니면 {
    출력("0 또는 음수")
}

Or jump into the REPL:

bash
hgl repl
한> 출력("안녕!")
안녕!

Key Examples

String Calculator

함수 계산(식: 문자열) -> 정수 {
    변수 부분 = 식.분리(" ")
    변수 왼쪽 = 정수변환(부분[0])
    변수 연산자 = 부분[1]
    변수 오른쪽 = 정수변환(부분[2])

    맞춤 연산자 {
        "+" => { 반환 왼쪽 + 오른쪽 }
        "-" => { 반환 왼쪽 - 오른쪽 }
        "*" => { 반환 왼쪽 * 오른쪽 }
        "/" => { 반환 왼쪽 / 오른쪽 }
        _ => { 반환 0 }
    }
}

출력(계산("10 + 20"))     // 30
출력(계산("6 * 7"))       // 42

Todo List with Structs

…

bash git clone https://github.com/xodn348/han.git cd han ./install.sh


This installs `hgl` globally and automatically sets up the VS Code extension (syntax highlighting + LSP) if VS Code is detected.

Alternatively from crates.io, install the published Rust package:

```bash
cargo install han-lang

The crates.io package name is han-lang to avoid naming ambiguity. The language remains Han, and the command installed on your PATH remains hgl.

The default crates.io install is intentionally Python-free so hgl runs without requiring a local Python dynamic library. If you want Python interop built in, install with cargo install han-lang --features python.


CLI Usage

hgl interpret     Run with interpreter (no clang needed)
hgl build         Compile to native binary (requires clang)
hgl run           Compile and run immediately
hgl check         Type-check only (no execution)
hgl init [name]             Create new Han project
hgl repl                    Interactive REPL
hgl lsp                     Start LSP server (hover + completion)

…

bash
cargo test

cargo test covers the lexer, parser, AST, interpreter, type checker, compiled backend, and integration scenarios such as closure capture, struct impl methods, tuples, and SOV parsing.


Contributing

See CONTRIBUTING.md for development setup, branch conventions, and the PR checklist.


License

MIT


Han — where the beauty of Hangul meets the precision of code.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustcompilerhangulkoreanllvm

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言